From: Victor Bazarov on
sasha wrote:
> Igor Tandetnik wrote:
>
>> "const" in the return type is meaningful at least for some possible
>> values of T. The warning does look spurious to me.
>
>
> FWIW, this code compiles fine with MSC, without any diagnostics. This
> causes some type conversions 'disablement', which seems incorrect.
>
> class t
> {
> operator bool();
> operator const bool();
> };

It's not the same, is it? Don't declare a conversion function, declare
a regular function even if it is an operator:

bool operator()();

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask