Skip to content

Commit

Permalink
Merge pull request #71 from likebeta/master
Browse files Browse the repository at this point in the history
support enum
  • Loading branch information
nlohmann committed May 9, 2015
2 parents 2b4e461 + 91aee10 commit aca3f65
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,11 @@ class basic_json
inline basic_json(const number_integer_t& value)
: m_type(value_t::number_integer), m_value(value)
{}

/// create an int number to support enum type (implicit)
inline basic_json(int int_enum)
: m_type(value_t::number_integer), m_value((NumberIntegerType)int_enum)
{}

/// create an integer number (implicit)
template<typename T, typename
Expand Down

0 comments on commit aca3f65

Please sign in to comment.