Skip to content

Commit

Permalink
fix enum.parse(const char*) in MAKE_ENUM.
Browse files Browse the repository at this point in the history
  • Loading branch information
gfgtdf committed Dec 30, 2015
1 parent 3da4f81 commit c101c0c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/make_enum.hpp
Expand Up @@ -167,6 +167,11 @@ struct NAME : public enum_tag \
PP_SEQ_FOR_EACH_I_PAIR(EXPAND_ENUMPARSE_NORMAL, str , CONTENT) \
return false; \
} \
/* for const char* parameters we cannot use the template above because it would only compare the pointer. */ \
bool parse (const char* str) \
{ \
return parse(std::string(str)); \
} \
static std::string name() \
{ \
return #NAME; \
Expand Down

0 comments on commit c101c0c

Please sign in to comment.