Merge pull request #1154 from scrossuk/cpp_master

Work around MSVC C++20 modules error for nested msgpack::object::with_zone
This commit is contained in:
Takatoshi Kondo 2025-04-13 17:13:59 +09:00 committed by GitHub
commit 1876badbae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View File

@ -32,11 +32,11 @@ struct object_kv {
msgpack::object val;
};
struct object::with_zone : msgpack::object {
with_zone(msgpack::zone& z) : zone(z) { }
struct object_with_zone_type : msgpack::object {
object_with_zone_type(msgpack::zone& z) : zone(z) { }
msgpack::zone& zone;
private:
with_zone();
object_with_zone_type();
};

View File

@ -68,6 +68,8 @@ public:
#endif // !defined(MSGPACK_USE_CPP03)
struct object_with_zone_type;
/// Object class that corresponding to MessagePack format object
/**
* See https://github.com/msgpack/msgpack-c/wiki/v1_1_cpp_object
@ -219,7 +221,8 @@ struct object {
template <typename T>
object& operator=(const T& v);
struct with_zone;
// Not a nested struct (i.e. 'struct with_zone;') to work around MSVC C++20 modules error C2504
typedef object_with_zone_type with_zone;
protected:
struct implicit_type;