Boost logo

Boost :

Subject: Re: [boost] IS THERE A WAY TO FIND IF A CERTAIN TYPE HAS A CERTAIN MEMBER?
From: Edward Diener (eldiener_at_[hidden])
Date: 2016-01-14 16:52:56


On 1/14/2016 2:35 PM, Juan Dent wrote:
>> HI,
>>
>>
>> I have read that via enable_if and other constructs, one can declare a member of a type conditionally.
>>
>> What I need is a way to be able to test whether a certain type has a certain method or member data, so that I can call it or use it accordingly.
>>
>> Does boost have something like this??

The TTI library can tell you whether or not a user-defined type has a
public member function or public member data.


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