Boost logo

Boost :

From: Giovanni Piero Deretta (gpderetta_at_[hidden])
Date: 2007-11-09 03:38:36

On Nov 9, 2007 2:06 AM, Sergey Shandar <sergey_at_[hidden]> wrote:
> [...]
> 3. I found this one today:
> template<class T>
> operator T &() const
> throw(typename ::boost::disable_if< ::boost::is_same<T, MyClass
> const> >::type *)

Wow! Does this really work? You can really apply SFINAE to conversion
opreators by
(ab)using the exception specification? Is this only a gcc thing or is
it "by the standard"?

If the latter, boost::enable_if documents might need to be updated :)


Boost list run by bdawes at, gregod at, cpdaniel at, john at