|
Boost : |
From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2003-01-11 23:30:46
----- Original Message -----
From: "David Abrahams" <dave_at_[hidden]>
To: "boost" <boost_at_[hidden]>
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?
Paul Mensonides
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk