diff options
author | Kenny Simpson <theonetruekenny@yahoo.com> | 2001-06-04 18:04:52 +0000 |
---|---|---|
committer | Phil Edwards <pme@gcc.gnu.org> | 2001-06-04 18:04:52 +0000 |
commit | 31990cd54c4c07598ceda192ed4893844f958671 (patch) | |
tree | 6f0b7b8913cd8452061b5ab11725d341527ca214 /libstdc++-v3 | |
parent | 0631e0bfb7d40fd3cb58d2d5400075f49000ab51 (diff) | |
download | gcc-31990cd54c4c07598ceda192ed4893844f958671.zip gcc-31990cd54c4c07598ceda192ed4893844f958671.tar.gz gcc-31990cd54c4c07598ceda192ed4893844f958671.tar.bz2 |
PR libstdc++/3035 and PR libstdc++/3036
2001-06-04 Kenny Simpson <theonetruekenny@yahoo.com>
Phil Edwards <pme@sources.redhat.com>
PR libstdc++/3035 and PR libstdc++/3036
* include/bits/stl_pair.h: Fix pair ctor and make_pair according
to LWG DR 181 and 265.
Co-Authored-By: Phil Edwards <pme@gcc.gnu.org>
From-SVN: r42865
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 7 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_pair.h | 7 |
2 files changed, 13 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 8203b2e..c482830 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2001-06-04 Kenny Simpson <theonetruekenny@yahoo.com> + Phil Edwards <pme@sources.redhat.com> + + PR libstdc++/3035 and PR libstdc++/3036 + * include/bits/stl_pair.h: Fix pair ctor and make_pair according + to LWG DR 181 and 265. + 2001-06-04 Phil Edwards <pme@sources.redhat.com> PR libstdc++/3034 diff --git a/libstdc++-v3/include/bits/stl_pair.h b/libstdc++-v3/include/bits/stl_pair.h index 8252d97..efb166c 100644 --- a/libstdc++-v3/include/bits/stl_pair.h +++ b/libstdc++-v3/include/bits/stl_pair.h @@ -41,7 +41,12 @@ struct pair { _T1 first; _T2 second; +#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS +//265. std::pair::pair() effects overly restrictive + pair() : first(), second() {} +#else pair() : first(_T1()), second(_T2()) {} +#endif pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) {} template <class _U1, class _U2> @@ -84,7 +89,7 @@ inline bool operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { template <class _T1, class _T2> #ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS //181. make_pair() unintended behavior -inline pair<_T1, _T2> make_pair(const _T1 __x, const _T2 __y) +inline pair<_T1, _T2> make_pair(_T1 __x, _T2 __y) #else inline pair<_T1, _T2> make_pair(const _T1& __x, const _T2& __y) #endif |