|
Boost : |
From: Sergey Shandar (sergey_at_[hidden])
Date: 2007-11-10 07:19:16
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? )
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk