I have a template which should only apply for a type that is defined with BOOST_HANA_DEFINE_STRUCT or has adapt by BOOST_HANA_ADAPT_STRUCT. Something like following:
template <typename T>
std::enable_if_t<is_hana_struct<T>::value, void>
myfunc(T x)
{
}
How do I implement the is_hana_struct?
I think you're looking for hana::Struct<T>::value
: http://boostorg.github.io/hana/group__group-_struct.html