2003-06-06 Nathan Myers <ncm-nospam@cantrip.org>
authorNathan Myers <ncm-nospam@cantrip.org>
Fri, 6 Jun 2003 17:19:56 +0000 (17:19 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Fri, 6 Jun 2003 17:19:56 +0000 (17:19 +0000)
* 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

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/basic_string.h
libstdc++-v3/include/bits/stl_iterator.h

index 286c5c85a47675e524f50a53d06c82c60e597afa..09ff261ba5cf369b60b261253a1451eece93220d 100644 (file)
@@ -1,3 +1,10 @@
+2003-06-06  Nathan Myers  <ncm-nospam@cantrip.org>
+
+       * 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  <bkoz@redhat.com>
 
        * include/bits/stl_alloc.h: Cleanups.
index 6d3cb9b9028e62b7c92bd986f274ff749a7b4edb..b4658d640c2f3c2c8d12bb1b891dab307278acef 100644 (file)
@@ -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;
 
index a996f4c34ed6f9eb573b6e159b860583218a2700..734ff78fe18fd1b12ef5593a3951e5eaf4598978 100644 (file)
@@ -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.