g++ does not honour "explicit" keyword in all cases?

Reid Spencer reid@x10sys.com
Thu Oct 30 00:56:00 GMT 2003


On Wed, 2003-10-29 at 09:47, Gabriel Dos Reis wrote:

> 
> Hm, I guess there is something I'm missing here.  From the definition
> of Bar<double>::bar, the return type is double and there is no mention
> of Foo, so I can't see what is wrong with the code.
> 
> -- Gaby

Glad you said it. I was wondering if I was missing something there. I
can't see any connection between Foo and Bar at all. The type conversion
from the integer return value (1) of Bar<T>::bar() to its return type,
should work fine when T=double. Of course, the foo function just throws
away the result. Foo, with explicit constructor or not, just isn't
involved. 

Richard: is this the example you meant to post?

Reid Spencer
eXtensible Systems, Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20031030/f7c57ab2/attachment.sig>


More information about the Gcc mailing list