Re: [VC 7.1] const_reverse_iterator problem

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Tom Widmer (tom_usenet_at_hotmail.com)
Date: 01/24/05


Date: Mon, 24 Jan 2005 12:26:48 +0000

Aurélien REGAT-BARREL wrote:

>
> The error is:
>
> test.cpp(12) : error C2784: 'bool std::operator !=(const std::_Tree<_Traits>
> &,c
> onst std::_Tree<_Traits> &)' : could not deduce template argument for 'const
> std
> ::_Tree<_Traits> &' from 'std::set<_Kty>::const_reverse_iterator'
> with
> [
> _Kty=int
> ]
>
> There is no problem with g++.
>
> It is not a real problem for me, but I would like to understand what is
> wrong.

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

I assume GCC implements the solution to the defect - check the gcc
headers (they usually include the defect number in a comment when
they've made such a fix).

Tom