Prev: To include or not to include.... C language!
Next: Reference to an undefined assignment operator of a base class in a derived class.
From: Victor Bazarov on 19 Dec 2009 14:25 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 |