Subject: Re: [boost] Is there interest in a library for testing existence of a function member of class?
From: ºúÎ¬ (huwei04_at_[hidden])
Date: 2014-11-24 01:16:40
> To: boost_at_[hidden]
> Date: Sat, 22 Nov 2014 17:58:09 +0000
> From: spam_from_boost_dev_at_[hidden]
> Subject: Re: [boost] Is there interest in a library for testing existence of a function member of class?
> TONGARI J wrote:
> > 2014-11-22 17:36 GMT+08:00 ?? <huwei04_at_[hidden]>:
> >> Hi,
> >> I am looking for how to test if a function member of class exist or not in
> >> compile time.I did not find a solution by google so I wrote a piece of code
> >> for it.Please let me know if it's already in boost. :)
> > Yes, it's in Boost.TTI: http://tinyurl.com/k3y5x8l
> Has anyone ever worked out how to do this without having to specify
> the type? E.g. with BOOST_TTI_HAS_MEMBER_DATA I need to write
> something like
> has_member_data_fieldname<int ClasdName::*>::value;
> The most recent time I needed something like this, I wanted to test
> whether a struct contained a field with a particular name that was
> convertible to a float (I think float or int16_t in that case).
> I would have been happy with a test for a field with that name of
> any type. But I couldn't work out how to do it. Any ideas?
> Regards, Phil.
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost