1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-09 11:01:47 +03:00

overworked code for pull request #71

This commit is contained in:
Niels
2015-05-09 15:29:20 +02:00
parent aca3f65bbe
commit 9cdd278f45
3 changed files with 20 additions and 3 deletions

View File

@ -418,6 +418,11 @@ class basic_json
: m_type(value_t::number_integer), m_value(value)
{}
/// create an int number to support enum type (implicit)
inline basic_json(const int int_enum)
: m_type(value_t::number_integer), m_value(static_cast<number_integer_t>(int_enum))
{}
/// create an integer number (implicit)
template<typename T, typename
std::enable_if<