diff --git a/strongdef.hpp b/strongdef.hpp index 78bdd231..9de4beaa 100644 --- a/strongdef.hpp +++ b/strongdef.hpp @@ -25,6 +25,10 @@ namespace cruft::strongdef { using value_type = T; using tag_type = TagT; + /// We detect underlying_type in a few situations where we emulate + /// 'enum-like' structures. This lets us opt in to this behaviour. + using underlying_type = T; + // TODO: ideally we'd default the constructor, but templated // constructors can't be defaulted? So we just stub one out. constexpr explicit index () { ; } @@ -144,9 +148,8 @@ namespace cruft::types { template struct category_traits< ::cruft::strongdef::index - > : - public category_traits - {}; + > : public std::integral_constant + { ; }; template