From: Nathan Myers Date: Fri, 6 Jun 2003 17:19:56 +0000 (+0000) Subject: 2003-06-06 Nathan Myers X-Git-Tag: releases/gcc-3.4.0~6093 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d56a88114a6afecfd9658778879a9250699829e4;p=thirdparty%2Fgcc.git 2003-06-06 Nathan Myers * include/bits/stl_iterator.h (reverse_iterator::reverse_iterator()): Apply DR235: default constructor default-initializes data member. Instantiated on a pointer type, the member has to end up equal to zero. From-SVN: r67559 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 286c5c85a476..09ff261ba5cf 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2003-06-06 Nathan Myers + + * include/bits/stl_iterator.h + (reverse_iterator::reverse_iterator()): Apply DR235: default + constructor default-initializes data member. Instantiated on a + pointer type, the member has to end up equal to zero. + 2003-06-06 Benjamin Kosnik * include/bits/stl_alloc.h: Cleanups. diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h index 6d3cb9b9028e..b4658d640c2f 100644 --- a/libstdc++-v3/include/bits/basic_string.h +++ b/libstdc++-v3/include/bits/basic_string.h @@ -846,7 +846,7 @@ namespace std compare(const _CharT* __s) const; // _GLIBCPP_RESOLVE_LIB_DEFECTS - // 5. String::compare specification questionable + // 5 String::compare specification questionable int compare(size_type __pos, size_type __n1, const _CharT* __s) const; diff --git a/libstdc++-v3/include/bits/stl_iterator.h b/libstdc++-v3/include/bits/stl_iterator.h index a996f4c34ed6..734ff78fe18f 100644 --- a/libstdc++-v3/include/bits/stl_iterator.h +++ b/libstdc++-v3/include/bits/stl_iterator.h @@ -106,9 +106,12 @@ namespace std public: /** - * The default constructor gives an undefined state to this %iterator. + * The default constructor default-initializes member @p current. + * If it is a pointer, that means it is zero-initialized. */ - reverse_iterator() { } + // _GLIBCPP_RESOLVE_LIB_DEFECTS + // 235 No specification of default ctor for reverse_iterator + reverse_iterator() : current() { } /** * This %iterator will move in the opposite direction that @p x does.