
2 Jul
2008
2 Jul
'08
10:06 p.m.
Giovanni Piero Deretta wrote:
On Wed, Jul 2, 2008 at 8:40 PM, Eric Niebler <eric@boost-consulting.com> wrote:
I don't know a sufficiently portable way to ask a type whether it has implemented the result_of protocol. In C++0x, result_of will simply use decltype, so at the very least Phoenix's approach is forward-compatible.
With 'portable' you mean 'works with non completely compliant compilers'? Otherwise I think you can legally sfinae on the presence of both result<> and result_type.
Demonstration, please. I don't know of a way to detect a nested template with SFINAE. -- Dave Abrahams BoostPro Computing http://www.boostpro.com