how do I check if a struct has BOOST_HANA_ADAPT_STRUCT in a template?

Viewed 67

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?

1 Answers
Related