Recently, I had to use Boost.FunctionType as a companion library of Boost.TTI
Specifically, I needed to check for the presence of a const-qualified id()
member function (returning a std::size_t
).
Due to the const-qualification, the plain solution:
using has_id_type = typename detail::has_member_function_id<workplan_type>::type
was not working, I had to do:
BOOST_TTI_HAS_MEMBER_FUNCTION(id);
using has_id_type = typename detail::has_member_function_id<workplan_type, std::size_t, boost::mpl::vector<>, boost::function_types::const_non_volatile>::type;
The list of possible tags is reported here, while the definition of the BOOST_TTI_HAS_MEMBER_FUNCTION
macro is here.