
10 Nov
2007
10 Nov
'07
12:19 p.m.
shunsuke wrote:
Sergey Shandar 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 *)
You've solved the millenium problem! :-)
gcc3.4.5 and 4.1.2 seem to work fine. Thanks!
Right, here is the new problem: If you specify at least one throw type (we do) then you have to specify all possible exceptions for the function! template<class T> operator T &() const throw(typename ::boost::disable_if< ::boost::is_same<T, MyClass const> >::type *) throw(::std::exception) throw(::MyLibrary::exception) throw( what else? )