Boost logo

Boost :

Subject: Re: [boost] How to determine if a function with a given signature is declared?
From: Edward Diener (eldiener_at_[hidden])
Date: 2011-05-22 14:34:31


On 5/18/2011 1:36 AM, Vicente Botet wrote:
>
> Edward Diener-3 wrote:
>>
>> On 5/17/2011 6:06 PM, Vicente Botet wrote:
>>>
>>> andrew.beck wrote:
>>>>
>>>> Hi,
>>>> Newbie question follows...
>>>>
>>>> I've used BOOST_MPL_HAS_XXX_TRAIT_DEF in the past but recently needed to
>>>> determine if a function was defined with a given signature. Searching
>>>> boost::mpl, stackoverflow etc, I couldn't find anything to do what I
>>>> needed. I've attached my solution below. Basically, I'm wondering if
>>>> there
>>>> is a boost::mpl solution or some other more elegant solution.
>>>>
>>>>
>>>
>>>
>>> Maybe Type Traits Introspection on the review schedule could help yuu
>>> (http://www.boost.org/community/review_schedule.html)
>>
>> Only if the function is within a type as a member function or static
>> member function.
>>
>>
>
> Wow, I missed this point. For example, Boost.Thread make use of some traits
> of this kind. I guess that it should be no too much work to provide the
> equivalent for free functions; isn't it?

If it can be done it should be a separate library.

My library is Type Traits Introspection, meaning it introspects a type.


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