| Home | Libraries | People | FAQ | More

#### is_described_enum

Determine if `T` should be treated as a described enum.

##### Synopsis

Defined in header `<boost/json/conversion.hpp>`

    template<
        class T>
    struct is_described_enum

##### Description

Described enums are serialised as strings when their value equals to a described enumerator, and as integers otherwise. The reverse operation does not convert numbers to enums values, though, and instead produces an error.

If `boost::describe::has_describe_enumerators<T>::value` is `true`, then the trait provides the member constant `value` that is equal to `true`. Otherwise, `value` is equal to `false`.

Users can specialize the trait for their own enums if they don't want them to be treated as described enums. For example:

    namespace boost {
    namespace json {

    template <>
    struct is_described_enum<your::described_enum> : std::false_type
    { };

    } // namespace boost
    } // namespace json

##### See Also

Boost.Describe.

Convenience header `<boost/json.hpp>`