----- Original Message ----- From: "David Abrahams" <[EMAIL PROTECTED]>
> >> 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. I know, but I don't think you can derive a 'void' parameter list that way. E.g. template<class> struct test; // not defined template<class T> struct test<void (*)(T)> { }; // defined void f(void) { } int main() { test< &f >(); // error return 0; } In other words, the "void" parameter list is fundamentally different than "type void". Paul Mensonides _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost