Peter Dimov wrote: > Eric Friedman wrote: > > Peter Dimov wrote: > [...] > >> template <class T, ...> T & extract(variant<...> & operand); > >> template <class T, ...> T const & extract(variant<...> const & > >> operand); template <class T, ...> T * extract(variant<...> * > >> operand); > >> template <class T, ...> T const * extract(variant<...> const * > >> operand); > >> > >> it's no longer ambiguous. > > > > I believe it is. The following (admittedly silly) example fails to > > compile under Comeau: > > > > // -- BEGIN CODE EXAMPLE -- > > template <class T, class Extractable> T & extract(Extractable & > > operand); template <class T, class Extractable> T const & > > extract(Extractable const & operand); > > > > template <class T, class Extractable> T * extract(Extractable * > > operand); template <class T, class Extractable> T const * > > extract(Extractable const * operand); > > This is not what I wrote above.
OK, I believe I see what you're saying. Problem is that I was trying to design a general boost::extract<> facility, one that needs not be specialized for each type. (Indeed, with my design, visitable types need not be cognizant of the facility at all.) Is this impossible? Or am I in fact misunderstanding what you're trying to say? Thanks, Eric _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost