This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug c++/11240] Weirdness with reverse_iterator<const char*>


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 );
}


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