mirror of
https://github.com/Neargye/magic_enum.git
synced 2026-01-10 23:44:29 +00:00
fix using leak
This commit is contained in:
parent
5b282dd4e8
commit
5091dc6acf
1 changed files with 3 additions and 4 deletions
|
|
@ -97,22 +97,21 @@ namespace magic_enum {
|
||||||
#if defined(MAGIC_ENUM_USING_ALIAS_OPTIONAL)
|
#if defined(MAGIC_ENUM_USING_ALIAS_OPTIONAL)
|
||||||
MAGIC_ENUM_USING_ALIAS_OPTIONAL
|
MAGIC_ENUM_USING_ALIAS_OPTIONAL
|
||||||
#else
|
#else
|
||||||
template <typename T>
|
using std::optional;
|
||||||
using optional = std::optional<T>;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// If need another string_view type, define the macro MAGIC_ENUM_USING_ALIAS_STRING_VIEW.
|
// If need another string_view type, define the macro MAGIC_ENUM_USING_ALIAS_STRING_VIEW.
|
||||||
#if defined(MAGIC_ENUM_USING_ALIAS_STRING_VIEW)
|
#if defined(MAGIC_ENUM_USING_ALIAS_STRING_VIEW)
|
||||||
MAGIC_ENUM_USING_ALIAS_STRING_VIEW
|
MAGIC_ENUM_USING_ALIAS_STRING_VIEW
|
||||||
#else
|
#else
|
||||||
using string_view = std::string_view;
|
using std::string_view;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// If need another string type, define the macro MAGIC_ENUM_USING_ALIAS_STRING.
|
// If need another string type, define the macro MAGIC_ENUM_USING_ALIAS_STRING.
|
||||||
#if defined(MAGIC_ENUM_USING_ALIAS_STRING)
|
#if defined(MAGIC_ENUM_USING_ALIAS_STRING)
|
||||||
MAGIC_ENUM_USING_ALIAS_STRING
|
MAGIC_ENUM_USING_ALIAS_STRING
|
||||||
#else
|
#else
|
||||||
using string = std::string;
|
using std::string;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace customize {
|
namespace customize {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue