msgpack-c icon indicating copy to clipboard operation
msgpack-c copied to clipboard

Issue with nil on MacOS and C++

Open pizzafilms opened this issue 7 years ago • 2 comments

I'm getting an "Expected unqualified-id" error in nil_decl.hpp on the line:

typedef nil_t nil;

All I have is:

#include <msgpack.hpp>

pizzafilms avatar Jun 19 '18 16:06 pizzafilms

On travis-ci https://travis-ci.org/msgpack/msgpack-c/jobs/384509443#L4 works.

What version of MacOS, msgpack-c, and compiler are you using?

redboltz avatar Jun 30 '18 14:06 redboltz

As a workaround, prepend #define MSGPACK_DISABLE_LEGACY_NIL before including msgpack.hpp, or add -DMSGPACK_DISABLE_LEGACY_NIL to your compile arguments.

#define MSGPACK_DISABLE_LEGACY_NIL
#include <msgpack.hpp>

mxmlnkn avatar May 11 '22 11:05 mxmlnkn