Commit f5677b15 by Paolo Carlini Committed by Paolo Carlini

codecvt_specializations.h: Change #ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS to a comment.

2003-10-12  Paolo Carlini  <pcarlini@unitus.it>

	* config/locale/ieee_1003.1-2001/codecvt_specializations.h:
	Change #ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS to a comment.
	* include/bits/basic_string.tcc: Likewise.
	* include/bits/ios_base.h: Likewise.
	* include/bits/istream.tcc: Likewise.
	* include/bits/locale_facets.tcc: Likewise.
	* include/bits/ostream.tcc: Likewise.
	* include/bits/stl_function.h: Likewise.
	* include/bits/stl_multiset.h: Likewise.
	* include/bits/stl_pair.h: Likewise.
	* include/bits/stl_set.h: Likewise.
	* include/bits/streambuf_iterator.h
	* include/std/std_iosfwd.h: Likewise.
	* include/std/std_istream.h: Likewise.
	* include/std/std_sstream.h: Likewise.
	* include/std/std_streambuf.h: Likewise.
	* src/ios.cc: Likewise.
	* include/bits/c++config:
	Comment out #define _GLIBCXX_RESOLVE_LIB_DEFECTS 1.
	* testsuite/27_io/ios_base/cons/assign_neg.cc: Tweak a
	dg-error directive due to removal of a blank line.
	* testsuite/27_io/ios_base/cons/copy_neg.cc: Likewise.

From-SVN: r72392
parent de006bbd
2003-10-12 Paolo Carlini <pcarlini@unitus.it>
* config/locale/ieee_1003.1-2001/codecvt_specializations.h:
Change #ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS to a comment.
* include/bits/basic_string.tcc: Likewise.
* include/bits/ios_base.h: Likewise.
* include/bits/istream.tcc: Likewise.
* include/bits/locale_facets.tcc: Likewise.
* include/bits/ostream.tcc: Likewise.
* include/bits/stl_function.h: Likewise.
* include/bits/stl_multiset.h: Likewise.
* include/bits/stl_pair.h: Likewise.
* include/bits/stl_set.h: Likewise.
* include/bits/streambuf_iterator.h
* include/std/std_iosfwd.h: Likewise.
* include/std/std_istream.h: Likewise.
* include/std/std_sstream.h: Likewise.
* include/std/std_streambuf.h: Likewise.
* src/ios.cc: Likewise.
* include/bits/c++config:
Comment out #define _GLIBCXX_RESOLVE_LIB_DEFECTS 1.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Tweak a
dg-error directive due to removal of a blank line.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Likewise.
2003-10-12 Andreas Tobler <a.tobler@schweiz.ch> 2003-10-12 Andreas Tobler <a.tobler@schweiz.ch>
Paolo Carlini <pcarlini@unitus.it> Paolo Carlini <pcarlini@unitus.it>
......
...@@ -453,11 +453,11 @@ ...@@ -453,11 +453,11 @@
const extern_type* __end, size_t __max) const const extern_type* __end, size_t __max) const
{ return std::min(__max, static_cast<size_t>(__end - __from)); } { return std::min(__max, static_cast<size_t>(__end - __from)); }
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 74. Garbled text for codecvt::do_max_length // 74. Garbled text for codecvt::do_max_length
template<typename _InternT, typename _ExternT> template<typename _InternT, typename _ExternT>
int int
codecvt<_InternT, _ExternT, __enc_traits>:: codecvt<_InternT, _ExternT, __enc_traits>::
do_max_length() const throw() do_max_length() const throw()
{ return 1; } { return 1; }
#endif
...@@ -502,12 +502,9 @@ namespace std ...@@ -502,12 +502,9 @@ namespace std
_S_create(size_t __capacity, const _Alloc& __alloc) _S_create(size_t __capacity, const _Alloc& __alloc)
{ {
typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 83. String::npos vs. string::max_size() // 83. String::npos vs. string::max_size()
if (__capacity > _S_max_size) if (__capacity > _S_max_size)
#else
if (__capacity == npos)
#endif
__throw_length_error("basic_string::_S_create"); __throw_length_error("basic_string::_S_create");
// NB: Need an array of char_type[__capacity], plus a // NB: Need an array of char_type[__capacity], plus a
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
//#define _GLIBCXX_DEPRECATED 1 //#define _GLIBCXX_DEPRECATED 1
// Use corrected code from the committee library group's issues list. // Use corrected code from the committee library group's issues list.
#define _GLIBCXX_RESOLVE_LIB_DEFECTS 1 //#define _GLIBCXX_RESOLVE_LIB_DEFECTS 1
// The remainder of the prewritten config is automatic; all the // The remainder of the prewritten config is automatic; all the
// user hooks are listed above. // user hooks are listed above.
......
...@@ -164,8 +164,8 @@ namespace std ...@@ -164,8 +164,8 @@ namespace std
class failure : public exception class failure : public exception
{ {
public: public:
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
//48. Use of non-existent exception constructor // 48. Use of non-existent exception constructor
explicit explicit
failure(const string& __str) throw(); failure(const string& __str) throw();
...@@ -179,7 +179,6 @@ namespace std ...@@ -179,7 +179,6 @@ namespace std
private: private:
string _M_msg; string _M_msg;
#endif
}; };
// 27.4.2.1.2 Type ios_base::fmtflags // 27.4.2.1.2 Type ios_base::fmtflags
...@@ -738,14 +737,13 @@ namespace std ...@@ -738,14 +737,13 @@ namespace std
protected: protected:
ios_base(); ios_base();
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
//50. Copy constructor and assignment operator of ios_base // 50. Copy constructor and assignment operator of ios_base
private: private:
ios_base(const ios_base&); ios_base(const ios_base&);
ios_base& ios_base&
operator=(const ios_base&); operator=(const ios_base&);
#endif
}; };
// [27.4.5.1] fmtflags manipulators // [27.4.5.1] fmtflags manipulators
......
...@@ -62,11 +62,10 @@ namespace std ...@@ -62,11 +62,10 @@ namespace std
traits_type::to_char_type(__c))) traits_type::to_char_type(__c)))
__c = __sb->snextc(); __c = __sb->snextc();
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
//195. Should basic_istream::sentry's constructor ever set eofbit? // 195. Should basic_istream::sentry's constructor ever set eofbit?
if (traits_type::eq_int_type(__c, __eof)) if (traits_type::eq_int_type(__c, __eof))
__in.setstate(ios_base::eofbit); __in.setstate(ios_base::eofbit);
#endif
} }
} }
...@@ -147,7 +146,7 @@ namespace std ...@@ -147,7 +146,7 @@ namespace std
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
const __num_get_type& __ng = __check_facet(this->_M_num_get); const __num_get_type& __ng = __check_facet(this->_M_num_get);
__ng.get(*this, 0, *this, __err, __l); __ng.get(*this, 0, *this, __err, __l);
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 118. basic_istream uses nonexistent num_get member functions. // 118. basic_istream uses nonexistent num_get member functions.
if (!(__err & ios_base::failbit) if (!(__err & ios_base::failbit)
&& (numeric_limits<short>::min() <= __l && (numeric_limits<short>::min() <= __l
...@@ -155,7 +154,6 @@ namespace std ...@@ -155,7 +154,6 @@ namespace std
__n = __l; __n = __l;
else else
__err |= ios_base::failbit; __err |= ios_base::failbit;
#endif
this->setstate(__err); this->setstate(__err);
} }
catch(...) catch(...)
...@@ -211,7 +209,7 @@ namespace std ...@@ -211,7 +209,7 @@ namespace std
ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
const __num_get_type& __ng = __check_facet(this->_M_num_get); const __num_get_type& __ng = __check_facet(this->_M_num_get);
__ng.get(*this, 0, *this, __err, __l); __ng.get(*this, 0, *this, __err, __l);
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 118. basic_istream uses nonexistent num_get member functions. // 118. basic_istream uses nonexistent num_get member functions.
if (!(__err & ios_base::failbit) if (!(__err & ios_base::failbit)
&& (numeric_limits<int>::min() <= __l && (numeric_limits<int>::min() <= __l
...@@ -219,7 +217,6 @@ namespace std ...@@ -219,7 +217,6 @@ namespace std
__n = __l; __n = __l;
else else
__err |= ios_base::failbit; __err |= ios_base::failbit;
#endif
this->setstate(__err); this->setstate(__err);
} }
catch(...) catch(...)
...@@ -844,10 +841,9 @@ namespace std ...@@ -844,10 +841,9 @@ namespace std
basic_istream<_CharT, _Traits>:: basic_istream<_CharT, _Traits>::
putback(char_type __c) putback(char_type __c)
{ {
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 60. What is a formatted input function? // 60. What is a formatted input function?
_M_gcount = 0; _M_gcount = 0;
#endif
sentry __cerb(*this, true); sentry __cerb(*this, true);
if (__cerb) if (__cerb)
{ {
...@@ -876,10 +872,9 @@ namespace std ...@@ -876,10 +872,9 @@ namespace std
basic_istream<_CharT, _Traits>:: basic_istream<_CharT, _Traits>::
unget(void) unget(void)
{ {
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 60. What is a formatted input function? // 60. What is a formatted input function?
_M_gcount = 0; _M_gcount = 0;
#endif
sentry __cerb(*this, true); sentry __cerb(*this, true);
if (__cerb) if (__cerb)
{ {
...@@ -957,14 +952,13 @@ namespace std ...@@ -957,14 +952,13 @@ namespace std
// DR60. Do not change _M_gcount. // DR60. Do not change _M_gcount.
if (!this->fail()) if (!this->fail())
{ {
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 136. seekp, seekg setting wrong streams? // 136. seekp, seekg setting wrong streams?
pos_type __err = this->rdbuf()->pubseekpos(__pos, ios_base::in); pos_type __err = this->rdbuf()->pubseekpos(__pos, ios_base::in);
// 129. Need error indication from seekp() and seekg() // 129. Need error indication from seekp() and seekg()
if (__err == pos_type(off_type(-1))) if (__err == pos_type(off_type(-1)))
this->setstate(ios_base::failbit); this->setstate(ios_base::failbit);
#endif
} }
return *this; return *this;
} }
...@@ -977,15 +971,14 @@ namespace std ...@@ -977,15 +971,14 @@ namespace std
// DR60. Do not change _M_gcount. // DR60. Do not change _M_gcount.
if (!this->fail()) if (!this->fail())
{ {
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 136. seekp, seekg setting wrong streams? // 136. seekp, seekg setting wrong streams?
pos_type __err = this->rdbuf()->pubseekoff(__off, __dir, pos_type __err = this->rdbuf()->pubseekoff(__off, __dir,
ios_base::in); ios_base::in);
// 129. Need error indication from seekp() and seekg() // 129. Need error indication from seekp() and seekg()
if (__err == pos_type(off_type(-1))) if (__err == pos_type(off_type(-1)))
this->setstate(ios_base::failbit); this->setstate(ios_base::failbit);
#endif
} }
return *this; return *this;
} }
...@@ -1052,10 +1045,9 @@ namespace std ...@@ -1052,10 +1045,9 @@ namespace std
if (_Traits::eq_int_type(__c, __eof)) if (_Traits::eq_int_type(__c, __eof))
__in.setstate(ios_base::eofbit); __in.setstate(ios_base::eofbit);
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
//68. Extractors for char* should store null at end // 68. Extractors for char* should store null at end
*__s = char_type(); *__s = char_type();
#endif
__in.width(0); __in.width(0);
} }
catch(...) catch(...)
...@@ -1136,11 +1128,10 @@ namespace std ...@@ -1136,11 +1128,10 @@ namespace std
__in.setstate(ios_base::eofbit); __in.setstate(ios_base::eofbit);
__in.width(0); __in.width(0);
} }
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
//211. operator>>(istream&, string&) doesn't set failbit // 211. operator>>(istream&, string&) doesn't set failbit
if (!__extracted) if (!__extracted)
__in.setstate (ios_base::failbit); __in.setstate (ios_base::failbit);
#endif
return __in; return __in;
} }
......
...@@ -409,8 +409,8 @@ namespace std ...@@ -409,8 +409,8 @@ namespace std
return __beg; return __beg;
} }
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
//17. Bad bool parsing // 17. Bad bool parsing
template<typename _CharT, typename _InIter> template<typename _CharT, typename _InIter>
_InIter _InIter
num_get<_CharT, _InIter>:: num_get<_CharT, _InIter>::
...@@ -479,7 +479,6 @@ namespace std ...@@ -479,7 +479,6 @@ namespace std
} }
return __beg; return __beg;
} }
#endif
template<typename _CharT, typename _InIter> template<typename _CharT, typename _InIter>
_InIter _InIter
...@@ -863,8 +862,8 @@ namespace std ...@@ -863,8 +862,8 @@ namespace std
_M_group_float(const string& __grouping, _CharT __sep, const _CharT* __p, _M_group_float(const string& __grouping, _CharT __sep, const _CharT* __p,
_CharT* __new, _CharT* __cs, int& __len) const _CharT* __new, _CharT* __cs, int& __len) const
{ {
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
//282. What types does numpunct grouping refer to? // 282. What types does numpunct grouping refer to?
// Add grouping, if necessary. // Add grouping, if necessary.
_CharT* __p2; _CharT* __p2;
const int __declen = __p ? __p - __cs : __len; const int __declen = __p ? __p - __cs : __len;
...@@ -880,7 +879,6 @@ namespace std ...@@ -880,7 +879,6 @@ namespace std
__newlen += __len - __declen; __newlen += __len - __declen;
} }
__len = __newlen; __len = __newlen;
#endif
} }
// The following code uses snprintf (or sprintf(), when // The following code uses snprintf (or sprintf(), when
......
...@@ -428,14 +428,13 @@ namespace std ...@@ -428,14 +428,13 @@ namespace std
{ {
if (!this->fail()) if (!this->fail())
{ {
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 136. seekp, seekg setting wrong streams? // 136. seekp, seekg setting wrong streams?
pos_type __err = this->rdbuf()->pubseekpos(__pos, ios_base::out); pos_type __err = this->rdbuf()->pubseekpos(__pos, ios_base::out);
// 129. Need error indication from seekp() and seekg() // 129. Need error indication from seekp() and seekg()
if (__err == pos_type(off_type(-1))) if (__err == pos_type(off_type(-1)))
this->setstate(ios_base::failbit); this->setstate(ios_base::failbit);
#endif
} }
return *this; return *this;
} }
...@@ -447,15 +446,14 @@ namespace std ...@@ -447,15 +446,14 @@ namespace std
{ {
if (!this->fail()) if (!this->fail())
{ {
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 136. seekp, seekg setting wrong streams? // 136. seekp, seekg setting wrong streams?
pos_type __err = this->rdbuf()->pubseekoff(__off, __d, pos_type __err = this->rdbuf()->pubseekoff(__off, __d,
ios_base::out); ios_base::out);
// 129. Need error indication from seekp() and seekg() // 129. Need error indication from seekp() and seekg()
if (__err == pos_type(off_type(-1))) if (__err == pos_type(off_type(-1)))
this->setstate(ios_base::failbit); this->setstate(ios_base::failbit);
#endif
} }
return *this; return *this;
} }
...@@ -576,11 +574,10 @@ namespace std ...@@ -576,11 +574,10 @@ namespace std
operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
{ {
typedef basic_ostream<_CharT, _Traits> __ostream_type; typedef basic_ostream<_CharT, _Traits> __ostream_type;
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 167. Improper use of traits_type::length() // 167. Improper use of traits_type::length()
// Note that this is only in 'Review' status. // Note that this is only in 'Review' status.
typedef char_traits<char> __traits_type; typedef char_traits<char> __traits_type;
#endif
typename __ostream_type::sentry __cerb(__out); typename __ostream_type::sentry __cerb(__out);
if (__cerb && __s) if (__cerb && __s)
{ {
...@@ -672,9 +669,8 @@ namespace std ...@@ -672,9 +669,8 @@ namespace std
const streamsize __w = __out.width(); const streamsize __w = __out.width();
streamsize __len = static_cast<streamsize>(__str.size()); streamsize __len = static_cast<streamsize>(__str.size());
const _CharT* __s = __str.data(); const _CharT* __s = __str.data();
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 25. String operator<< uses width() value wrong // 25. String operator<< uses width() value wrong
#endif
if (__w > __len) if (__w > __len)
{ {
_CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
......
...@@ -361,13 +361,12 @@ public: ...@@ -361,13 +361,12 @@ public:
operator()(const typename _Operation::second_argument_type& __x) const { operator()(const typename _Operation::second_argument_type& __x) const {
return op(value, __x); return op(value, __x);
} }
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
//109. Missing binders for non-const sequence elements // 109. Missing binders for non-const sequence elements
typename _Operation::result_type typename _Operation::result_type
operator()(typename _Operation::second_argument_type& __x) const { operator()(typename _Operation::second_argument_type& __x) const {
return op(value, __x); return op(value, __x);
} }
#endif
}; };
/// One of the @link s20_3_6_binder binder functors@endlink. /// One of the @link s20_3_6_binder binder functors@endlink.
...@@ -395,13 +394,12 @@ public: ...@@ -395,13 +394,12 @@ public:
operator()(const typename _Operation::first_argument_type& __x) const { operator()(const typename _Operation::first_argument_type& __x) const {
return op(__x, value); return op(__x, value);
} }
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
//109. Missing binders for non-const sequence elements // 109. Missing binders for non-const sequence elements
typename _Operation::result_type typename _Operation::result_type
operator()(typename _Operation::first_argument_type& __x) const { operator()(typename _Operation::first_argument_type& __x) const {
return op(__x, value); return op(__x, value);
} }
#endif
}; };
/// One of the @link s20_3_6_binder binder functors@endlink. /// One of the @link s20_3_6_binder binder functors@endlink.
......
...@@ -183,8 +183,8 @@ public: ...@@ -183,8 +183,8 @@ public:
size_type count(const key_type& __x) const { return _M_t.count(__x); } size_type count(const key_type& __x) const { return _M_t.count(__x); }
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
//214. set::find() missing const overload // 214. set::find() missing const overload
iterator find(const key_type& __x) { return _M_t.find(__x); } iterator find(const key_type& __x) { return _M_t.find(__x); }
const_iterator find(const key_type& __x) const { return _M_t.find(__x); } const_iterator find(const key_type& __x) const { return _M_t.find(__x); }
iterator lower_bound(const key_type& __x) { iterator lower_bound(const key_type& __x) {
...@@ -205,18 +205,6 @@ public: ...@@ -205,18 +205,6 @@ public:
pair<const_iterator,const_iterator> equal_range(const key_type& __x) const { pair<const_iterator,const_iterator> equal_range(const key_type& __x) const {
return _M_t.equal_range(__x); return _M_t.equal_range(__x);
} }
#else
iterator find(const key_type& __x) const { return _M_t.find(__x); }
iterator lower_bound(const key_type& __x) const {
return _M_t.lower_bound(__x);
}
iterator upper_bound(const key_type& __x) const {
return _M_t.upper_bound(__x);
}
pair<iterator,iterator> equal_range(const key_type& __x) const {
return _M_t.equal_range(__x);
}
#endif
template <class _K1, class _C1, class _A1> template <class _K1, class _C1, class _A1>
friend bool operator== (const multiset<_K1,_C1,_A1>&, friend bool operator== (const multiset<_K1,_C1,_A1>&,
......
...@@ -72,14 +72,12 @@ struct pair { ...@@ -72,14 +72,12 @@ struct pair {
_T1 first; ///< @c first is a copy of the first object _T1 first; ///< @c first is a copy of the first object
_T2 second; ///< @c second is a copy of the second object _T2 second; ///< @c second is a copy of the second object
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
//265. std::pair::pair() effects overly restrictive // 265. std::pair::pair() effects overly restrictive
/** The default constructor creates @c first and @c second using their /** The default constructor creates @c first and @c second using their
* respective default constructors. */ * respective default constructors. */
pair() : first(), second() {} pair() : first(), second() {}
#else
pair() : first(_T1()), second(_T2()) {}
#endif
/** Two objects may be passed to a @c pair constructor to be copied. */ /** Two objects may be passed to a @c pair constructor to be copied. */
pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) {} pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) {}
...@@ -138,12 +136,9 @@ inline bool operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { ...@@ -138,12 +136,9 @@ inline bool operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
* the LWG by default. * the LWG by default.
*/ */
template <class _T1, class _T2> template <class _T1, class _T2>
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
//181. make_pair() unintended behavior // 181. make_pair() unintended behavior
inline pair<_T1, _T2> make_pair(_T1 __x, _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
{ {
return pair<_T1, _T2>(__x, __y); return pair<_T1, _T2>(__x, __y);
} }
......
...@@ -182,8 +182,8 @@ public: ...@@ -182,8 +182,8 @@ public:
return _M_t.find(__x) == _M_t.end() ? 0 : 1; return _M_t.find(__x) == _M_t.end() ? 0 : 1;
} }
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
//214. set::find() missing const overload // 214. set::find() missing const overload
iterator find(const key_type& __x) { return _M_t.find(__x); } iterator find(const key_type& __x) { return _M_t.find(__x); }
const_iterator find(const key_type& __x) const { return _M_t.find(__x); } const_iterator find(const key_type& __x) const { return _M_t.find(__x); }
iterator lower_bound(const key_type& __x) { iterator lower_bound(const key_type& __x) {
...@@ -204,18 +204,6 @@ public: ...@@ -204,18 +204,6 @@ public:
pair<const_iterator,const_iterator> equal_range(const key_type& __x) const { pair<const_iterator,const_iterator> equal_range(const key_type& __x) const {
return _M_t.equal_range(__x); return _M_t.equal_range(__x);
} }
#else
iterator find(const key_type& __x) const { return _M_t.find(__x); }
iterator lower_bound(const key_type& __x) const {
return _M_t.lower_bound(__x);
}
iterator upper_bound(const key_type& __x) const {
return _M_t.upper_bound(__x);
}
pair<iterator,iterator> equal_range(const key_type& __x) const {
return _M_t.equal_range(__x);
}
#endif
template <class _K1, class _C1, class _A1> template <class _K1, class _C1, class _A1>
friend bool operator== (const set<_K1,_C1,_A1>&, const set<_K1,_C1,_A1>&); friend bool operator== (const set<_K1,_C1,_A1>&, const set<_K1,_C1,_A1>&);
......
...@@ -109,7 +109,7 @@ namespace std ...@@ -109,7 +109,7 @@ namespace std
return __old; return __old;
} }
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 110 istreambuf_iterator::equal not const // 110 istreambuf_iterator::equal not const
// NB: there is also number 111 (NAD, Future) pending on this function. // NB: there is also number 111 (NAD, Future) pending on this function.
bool bool
...@@ -120,7 +120,6 @@ namespace std ...@@ -120,7 +120,6 @@ namespace std
bool __beof = traits_type::eq_int_type(__b._M_get(), __eof); bool __beof = traits_type::eq_int_type(__b._M_get(), __eof);
return (__thiseof && __beof || (!__thiseof && !__beof)); return (__thiseof && __beof || (!__thiseof && !__beof));
} }
#endif
private: private:
int_type int_type
......
...@@ -100,10 +100,9 @@ namespace std ...@@ -100,10 +100,9 @@ namespace std
template<typename _CharT, typename _Traits = char_traits<_CharT> > template<typename _CharT, typename _Traits = char_traits<_CharT> >
class ostreambuf_iterator; class ostreambuf_iterator;
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
// Not included. (??? Apparently no LWG number?) // Not included. (??? Apparently no LWG number?)
class ios_base; class ios_base;
#endif
/** /**
* @defgroup s27_2_iosfwd I/O Forward Declarations * @defgroup s27_2_iosfwd I/O Forward Declarations
......
...@@ -705,15 +705,14 @@ namespace std ...@@ -705,15 +705,14 @@ namespace std
public basic_ostream<_CharT, _Traits> public basic_ostream<_CharT, _Traits>
{ {
public: public:
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 271. basic_iostream missing typedefs // 271. basic_iostream missing typedefs
// Types (inherited): // Types (inherited):
typedef _CharT char_type; typedef _CharT char_type;
typedef typename _Traits::int_type int_type; typedef typename _Traits::int_type int_type;
typedef typename _Traits::pos_type pos_type; typedef typename _Traits::pos_type pos_type;
typedef typename _Traits::off_type off_type; typedef typename _Traits::off_type off_type;
typedef _Traits traits_type; typedef _Traits traits_type;
#endif
// Non-standard Types: // Non-standard Types:
typedef basic_istream<_CharT, _Traits> __istream_type; typedef basic_istream<_CharT, _Traits> __istream_type;
......
...@@ -65,10 +65,9 @@ namespace std ...@@ -65,10 +65,9 @@ namespace std
// Types: // Types:
typedef _CharT char_type; typedef _CharT char_type;
typedef _Traits traits_type; typedef _Traits traits_type;
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 251. basic_stringbuf missing allocator_type // 251. basic_stringbuf missing allocator_type
typedef _Alloc allocator_type; typedef _Alloc allocator_type;
#endif
typedef typename traits_type::int_type int_type; typedef typename traits_type::int_type int_type;
typedef typename traits_type::pos_type pos_type; typedef typename traits_type::pos_type pos_type;
typedef typename traits_type::off_type off_type; typedef typename traits_type::off_type off_type;
...@@ -304,10 +303,9 @@ namespace std ...@@ -304,10 +303,9 @@ namespace std
// Types: // Types:
typedef _CharT char_type; typedef _CharT char_type;
typedef _Traits traits_type; typedef _Traits traits_type;
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 251. basic_stringbuf missing allocator_type // 251. basic_stringbuf missing allocator_type
typedef _Alloc allocator_type; typedef _Alloc allocator_type;
#endif
typedef typename traits_type::int_type int_type; typedef typename traits_type::int_type int_type;
typedef typename traits_type::pos_type pos_type; typedef typename traits_type::pos_type pos_type;
typedef typename traits_type::off_type off_type; typedef typename traits_type::off_type off_type;
...@@ -423,10 +421,9 @@ namespace std ...@@ -423,10 +421,9 @@ namespace std
// Types: // Types:
typedef _CharT char_type; typedef _CharT char_type;
typedef _Traits traits_type; typedef _Traits traits_type;
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 251. basic_stringbuf missing allocator_type // 251. basic_stringbuf missing allocator_type
typedef _Alloc allocator_type; typedef _Alloc allocator_type;
#endif
typedef typename traits_type::int_type int_type; typedef typename traits_type::int_type int_type;
typedef typename traits_type::pos_type pos_type; typedef typename traits_type::pos_type pos_type;
typedef typename traits_type::off_type off_type; typedef typename traits_type::off_type off_type;
...@@ -542,10 +539,9 @@ namespace std ...@@ -542,10 +539,9 @@ namespace std
// Types: // Types:
typedef _CharT char_type; typedef _CharT char_type;
typedef _Traits traits_type; typedef _Traits traits_type;
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 251. basic_stringbuf missing allocator_type // 251. basic_stringbuf missing allocator_type
typedef _Alloc allocator_type; typedef _Alloc allocator_type;
#endif
typedef typename traits_type::int_type int_type; typedef typename traits_type::int_type int_type;
typedef typename traits_type::pos_type pos_type; typedef typename traits_type::pos_type pos_type;
typedef typename traits_type::off_type off_type; typedef typename traits_type::off_type off_type;
......
...@@ -764,14 +764,13 @@ namespace std ...@@ -764,14 +764,13 @@ namespace std
} }
#endif #endif
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
// Side effect of DR 50. // Side effect of DR 50.
private: private:
basic_streambuf(const __streambuf_type&) { }; basic_streambuf(const __streambuf_type&) { };
__streambuf_type& __streambuf_type&
operator=(const __streambuf_type&) { return *this; }; operator=(const __streambuf_type&) { return *this; };
#endif
}; };
} // namespace std } // namespace std
......
...@@ -338,10 +338,9 @@ namespace std ...@@ -338,10 +338,9 @@ namespace std
bool bool
ios_base::sync_with_stdio(bool __sync) ios_base::sync_with_stdio(bool __sync)
{ {
#ifdef _GLIBCXX_RESOLVE_LIB_DEFECTS // _GLIBCXX_RESOLVE_LIB_DEFECTS
// 49. Underspecification of ios_base::sync_with_stdio // 49. Underspecification of ios_base::sync_with_stdio
bool __ret = ios_base::Init::_S_synced_with_stdio; bool __ret = ios_base::Init::_S_synced_with_stdio;
#endif
// Turn off sync with C FILE* for cin, cout, cerr, clog iff // Turn off sync with C FILE* for cin, cout, cerr, clog iff
// currently synchronized. // currently synchronized.
......
...@@ -41,5 +41,5 @@ void test01() ...@@ -41,5 +41,5 @@ void test01()
io1 = io2; io1 = io2;
} }
// { dg-error "within this context" "" { target *-*-* } 41 } // { dg-error "within this context" "" { target *-*-* } 41 }
// { dg-error "is private" "" { target *-*-* } 747 } // { dg-error "is private" "" { target *-*-* } 746 }
// { dg-error "operator=" "" { target *-*-* } 0 } // { dg-error "operator=" "" { target *-*-* } 0 }
...@@ -41,5 +41,5 @@ void test02() ...@@ -41,5 +41,5 @@ void test02()
test_base io2 = io1; test_base io2 = io1;
} }
// { dg-error "within this context" "" { target *-*-* } 41 } // { dg-error "within this context" "" { target *-*-* } 41 }
// { dg-error "is private" "" { target *-*-* } 744 } // { dg-error "is private" "" { target *-*-* } 743 }
// { dg-error "copy constructor" "" { target *-*-* } 0 } // { dg-error "copy constructor" "" { target *-*-* } 0 }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment