Merge pull request #265 from redboltz/add_base_class_support

Base classes packing/converting/creating object::with_zone support in C+...
This commit is contained in:
Nobuyuki Kubota
2015-04-27 23:06:53 -07:00
3 changed files with 167 additions and 1 deletions

View File

@@ -43,6 +43,19 @@
msgpack::type::make_define(__VA_ARGS__).msgpack_object(o, z); \
}
#define MSGPACK_BASE(base) \
static_cast<base &>( \
const_cast< \
std::add_lvalue_reference< \
std::remove_const< \
std::remove_pointer< \
decltype(this) \
>::type \
>::type \
>::type \
>(*this) \
)
// MSGPACK_ADD_ENUM must be used in the global namespace.
#define MSGPACK_ADD_ENUM(enum_name) \
namespace msgpack { \