This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Apply DR235 correctly: reverse_iterator default ctor.


This one is pretty clear if you read the resolution of DR235 and the 
definitions of the terms involved.

Nathan Myers
ncm-nospam@cantrip.org

2003-06-05  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.


Index: bits/stl_iterator.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/stl_iterator.h,v
retrieving revision 1.22
diff -u -c -r1.22 stl_iterator.h
*** bits/stl_iterator.h	20 Jul 2002 06:26:27 -0000	1.22
--- bits/stl_iterator.h	6 Jun 2003 00:59:23 -0000
***************
*** 106,114 ****
  
      public:
        /**
!        *  The default constructor gives an undefined state to this %iterator.
        */
!       reverse_iterator() { }
  
        /**
         *  This %iterator will move in the opposite direction that @p x does.
--- 106,115 ----
  
      public:
        /**
!        *  The default constructor default-initializes member current.
!        *  (Per DR 235)
        */
!       reverse_iterator() : current() { }
  
        /**
         *  This %iterator will move in the opposite direction that @p x does.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]