"Paul Mensonides" <[EMAIL PROTECTED]> writes:
> ----- Original Message -----
> From: "David Abrahams" <[EMAIL PROTECTED]>
> To: "boost" <[EMAIL PROTECTED]>
> Sent: Saturday, January 11, 2003 8:10 PM
> Subject: [boost] Fun, only handled by vc6/7!
>
>
>>
>> Here's an interesting turn-of-the-tables: I was experimenting with
>> using SFINAE to disable conversion operators, and I discovered that
>> almost every compiler except vc6/7 rejects this code:
>>
>> template <class T> struct voidify { typedef void type; };
>> template <class T> struct Y {};
>> struct X
>> {
>> template <class T>
>> operator Y<T> (typename voidify<T>::type) const { return Y<T>(); }
>> };
>
> Is this even legal? I.e. for a user-defined conversion operator to have any
> arguments at all?
Look twice; the argument is void.
--
David Abrahams
[EMAIL PROTECTED] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost