KostinPavel

Results 20 comments of KostinPavel

In declare: "enum class enum_class_use_underlying_type : uint8_t" uint8_t - is underlying

Non-descriptive names should be serialized and deserialized as numbers. Serialization works as expected, but deserialization doesn't work as expected.

All right. I have to use a solution similar to yours. Yes, I had to enter ranges and/or lists of valid values for "enum". But still there should be a...

Suppose we are expecting a string, but there is a number. It is necessary to at least try to return a value, even without checking the validity of the value....

> What previous solutions? We never provided a generic conversion for described (or any other kind of) enums with a different behaviour. For example, the client and server parts may...

I have my own solution, and I have been successfully using it for a long time. But then I think that people would not be confused, it is necessary to...

For example, you can do something like this: ```c++ // described enums template result value_to_impl( try_value_to_tag, value const& jv, described_enum_conversion_tag) { T val = {}; (void)jv; #ifdef BOOST_DESCRIBE_CXX14 error_code ec;...

Worse, I think it's not being done. Those who need to check the values for validity will do this separately.

Alternatively, you can add a #define that will serialize and deserialize as a number. In the #define description, you can specify features... Or combine these two methods.