From e32c19e70f7b1e86c81c0003a0489eb0819a6bae Mon Sep 17 00:00:00 2001 From: Neargye Date: Sat, 1 Sep 2018 22:33:26 +0500 Subject: [PATCH] add nameof enum max search depth param --- include/nameof.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 {}; } };