Boost logo

Boost Users :

Subject: [Boost-users] Check if a type has a member function (inhrited member functions also) with Boost TTI
From: Hijok Payne (hijokpayne_at_[hidden])
Date: 2014-05-05 13:20:03


Boost TTI has very convenient macros for checking if a type has a member
function. See
http://www.boost.org/doc/libs/1_55_0/libs/tti/doc/html/the_type_traits_introspection_library/tti_detail_has_member_function.html

If I have not missing something BOOST_TTI_HAS_MEMBER_FUNCTION returns false
for inherited member functions.

Is there a convenient Boost solution for doing this? There is a
SO<http://stackoverflow.com/questions/1966362/sfinae-to-check-for-inherited-member-functions>
solution
based on SFINAE. But I would like to avoid that and would prefer a Boost
solution, since that way I am more sure it works on more compilers and I
want avoid maintaining code for each such specific behavior.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net