Re: [Mingw-users] set iterators are const always
- Date: Thu, 7 Feb 2008 10:34:12 -0000
- From: "Dave Korn" <dave.korn@xxxxxxxxxx>
- Subject: Re: [Mingw-users] set iterators are const always
On 06 February 2008 17:31, Paul Leder wrote:
> Matthias Böhm wrote:
>
>> In mingw, that won't compile, because the compiler complains that the
>> object the iterator is pointing to is constant:
>>
>> simple.cpp: In function `int main()':
>> simple.cpp:37: error: passing `const X' as `this' argument of `int
>> X::do_something_non_const()' discards qualifiers.
>>
>> But i'm using iterator, not const_iterator!!!
>
> This is really a question for comp.lang.c++. But, in short, your code is
> probably wrong; you don't say what 'do_something_non_const' actually
> does.
He may have thought that including the entire verbatim source code to the
function in the form of an OOTB-compilable self-contained testcase was
sufficient. ;-)
cheers,
DaveK
--
Can't think of a witty .sigline today....
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users