[PATCH] Apply DR235 correctly: reverse_iterator default ctor.
Nathan Myers
ncm-nospam@cantrip.org
Fri Jun 6 02:30:00 GMT 2003
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.
More information about the Libstdc++
mailing list