
Giovanni Piero Deretta wrote:
On Thu, Jul 3, 2008 at 12:06 AM, David Abrahams <dave@boostpro.com> wrote:
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.
Daniel Walker posted a patch sometime ago to add BOOST_HAS_TEMPLATE_XXX to mpl. Here is a link:
No patch attached. This probably came over from the sourceforge tracker, but that appears to be gone now so I can't even look there for the attachment. -- Dave Abrahams BoostPro Computing http://www.boostpro.com