This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11240] Weirdness with reverse_iterator<const char*>
- From: "paolo at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Oct 2003 10:13:21 -0000
- Subject: [Bug c++/11240] Weirdness with reverse_iterator<const char*>
- References: <20030618145210.11240.ysbeer@af.org.za>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11240
------- Additional Comments From paolo at gcc dot gnu dot org 2003-10-11 10:13 -------
... and templates have nothing to do with it!
Paolo.
/////////
#include <cassert>
class r_i
{
protected:
const char* current;
public:
r_i(const char* __x) : current(__x) { }
const char*
base() const { return current; }
};
int main()
{
// char s[] = "0";
const char s[] = "0";
// r_i r1(s);
r_i r1 = r_i(s);
assert( r1.base() == s );
}