Boost logo

Boost :

Subject: Re: [boost] C++11 Metaprogramming
From: paul Fultz (pfultz2_at_[hidden])
Date: 2012-04-04 19:07:45


----- Original Message -----
> From: Eric Niebler <eric_at_[hidden]>
> To: boost_at_[hidden]
> Cc:
> Sent: Wednesday, April 4, 2012 1:59 AM
> Subject: Re: [boost] C++11 Metaprogramming
>
> On 4/3/2012 10:20 AM, Dave Abrahams wrote:
>>
>> on Sun Apr 01 2012, Olivier Grant <olivier.grant-AT-gmail.com> wrote:
>>
>>> Hi Dave,
>>>
>>> That's going to be an interesting presentation. Here is a small
> piece of
>>> code that allows to generate a traits structure that determines if a
> call
>>> can be made on an object with a specific function name and specific
>>> arguments and return value :
>>>
>>> https://gist.github.com/2276393
>>> (compile with : g++ -std=c++0x -Wall -o has_callable has_callable.cpp)
>>>
>>> This was not possible in C++03, or at least not completely possible,
> and
>>> the code is much simpler with C++11 for the cases where it was possible
> as
>>> well.
>
> Well, there's this: http://tinyurl.com/85sv5sy [*]

I wonder if this technique could be extended for member functions in C++03.

Thanks,
Paul Fultz II


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk