mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-18 03:29:49 +02:00
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:
@@ -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 { \
|
||||
|
Reference in New Issue
Block a user