add nameof enum max search depth param
This commit is contained in:
parent
3634092bf2
commit
e32c19e70f
1 changed files with 6 additions and 2 deletions
|
@ -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 <typename T>
|
||||
struct NameofEnumImpl<T, 128> {
|
||||
struct NameofEnumImpl<T, NAMEOF_ENUM_MAX_SEARCH_DEPTH> {
|
||||
NAMEOF_CONSTEXPR nameof::cstring operator()(T) const { return {}; }
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct NameofEnumImpl<T, -128> {
|
||||
struct NameofEnumImpl<T, -NAMEOF_ENUM_MAX_SEARCH_DEPTH> {
|
||||
NAMEOF_CONSTEXPR nameof::cstring operator()(T) const { return {}; }
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue