Re: [VC 7.1] const_reverse_iterator problem
From: Aurélien REGAT-BARREL (nospam-aregatba_at_yahoo.fr.invalid)
Date: 01/24/05
- Previous message: Tom Widmer: "Re: [VC 7.1] const_reverse_iterator problem"
- In reply to: Tom Widmer: "Re: [VC 7.1] const_reverse_iterator problem"
- Next in thread: Ulrich Eckhardt: "Re: [VC 7.1] const_reverse_iterator problem"
- Reply: Ulrich Eckhardt: "Re: [VC 7.1] const_reverse_iterator problem"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 24 Jan 2005 14:12:17 +0100
> This is because of a defect in the standard:
> http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#280
> http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#179
Thank you for the links. But I still don't understand.
I'm not trying to compare 2 different kinds of iterators (reverse vs
non-reverse, or const vs non-const), but 2 reverse_const_iterator.
Since the following code compiles well:
set<int> s;
set<int>::const_reverse_iterator a = s.rbegin();
set<int>::const_reverse_iterator b = s.rend();
if ( a != b ) {}
I don't understand why this one is problematic :
if ( a != s.rend() ) {}
An overloaded version of rend() which returns a const_reverse_iterator
exists, that's why I don't understand where is the problem.
-- Aurélien REGAT-BARREL
- Previous message: Tom Widmer: "Re: [VC 7.1] const_reverse_iterator problem"
- In reply to: Tom Widmer: "Re: [VC 7.1] const_reverse_iterator problem"
- Next in thread: Ulrich Eckhardt: "Re: [VC 7.1] const_reverse_iterator problem"
- Reply: Ulrich Eckhardt: "Re: [VC 7.1] const_reverse_iterator problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|