strongdef: add is_strongdef type_trait

This commit is contained in:
Danny Robson 2020-09-11 13:36:04 +10:00
parent 9153155076
commit 34aed6c74d

View File

@ -76,6 +76,18 @@ namespace cruft::strongdef {
};
template <typename>
struct is_strongdef : public std::false_type {};
template <typename TagT, typename ValueT>
struct is_strongdef<strongdef::index<TagT, ValueT>> : public std::true_type {};
template <typename ValueT>
constexpr bool is_strongdef_v = is_strongdef<ValueT>::value;
template <typename TagT, typename T>
std::ostream&
operator<< (std::ostream &os, index<TagT,T> const &val)