
9 Nov
2007
9 Nov
'07
8:38 a.m.
On Nov 9, 2007 2:06 AM, Sergey Shandar <sergey@comrades.id.au> 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 :) -- gpd