diff --git a/include/nameof.hpp b/include/nameof.hpp index f411395..037cbf8 100644 --- a/include/nameof.hpp +++ b/include/nameof.hpp @@ -48,6 +48,10 @@ # define NAMEOF_CONSTEXPR inline #endif +#if !defined(NAMEOF_ENUM_MAX_SEARCH_DEPTH) +# define NAMEOF_ENUM_MAX_SEARCH_DEPTH 64 +#endif + namespace nameof { namespace detail { @@ -393,12 +397,12 @@ struct NameofEnumImpl { }; template -struct NameofEnumImpl { +struct NameofEnumImpl { NAMEOF_CONSTEXPR nameof::cstring operator()(T) const { return {}; } }; template -struct NameofEnumImpl { +struct NameofEnumImpl { NAMEOF_CONSTEXPR nameof::cstring operator()(T) const { return {}; } };