mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-04-27 02:16:18 +02:00

enum support had been incomplete. This fix made enum support complete. Replaced int with auto on c++11 scoped enum. Replaced template specializations with function overloads on operator<< and operator>> for enum. enum can convert to object with and without zone. When you want to adapt enum, you need to write as follows: // NOT msgpack.hpp enum yourenum { elem }; MSGPACK_ADD_ENUM(yourenum); // msgpack.hpp should be included after MSGPACK_ADD_ENUM(...) int main() { msgpack::object obj(yourenum::elem); }