Commit 91aee105 authored by 易思龙's avatar 易思龙

support enum

construct enum type to basic_json (proxy by int type)
```
    enum { t = 0 };
    json  j = json::array();
    j.push_back(t);

    j.push_back(json::object({
         {"game_type", t}
    }));
```
parent 9f9d293b
......@@ -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(int int_enum)
: m_type(value_t::number_integer), m_value((NumberIntegerType)int_enum)
{}
/// create an integer number (implicit)
template<typename T, typename
std::enable_if<
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment