5 Commits

Author SHA1 Message Date
Takatoshi Kondo
c4fb47c00d Fixed #204, #202.
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);
}
2015-01-31 22:19:31 +09:00
Takatoshi Kondo
737e6703df Fixed #191.
The names of float format family are changed.

old                      new
dec                   -> f64
MSGPACK_OBJECT_DOUBLE -> MSGPACK_OBJECT_FLOAT
msgpack::type::DOUBLE -> msgpack::type::FLOAT

Client codes could have compile errors when it use dec, MSGPACK_OBJECT_DOUBLE or msgpack::type::DOUBLE.
The best way to fix such errors, update client code. If it can't, set MSGPACK_USE_LEGACY_NAME_AS_FLOAT macro.
Then both old names and new names are available.
2015-01-16 00:20:43 +09:00
Takatoshi Kondo
037b1c22dc Fixed https://github.com/msgpack/msgpack-c/issues/144
This fix is ogirinally from https://github.com/msgpack/msgpack-c/pull/133

I removed raw support and added str, bin, and ext support.
2014-11-17 12:51:34 +09:00
Takatoshi Kondo
5896ff3746 Fixed -Wextra warnings on gcc. 2014-09-02 18:15:58 +09:00
Takatoshi Kondo
8920c49597 Unified test files extension as cpp. 2014-08-11 09:01:17 +09:00