msgpack/msgpack-c — pull request #134 by davidchappelle (2014-10-06 16:10:41+00:00)
Title: Allow message pack definition macros to be used in nested namespace.

This commit allows MSGPACK_DEFINE(...) to be used from within a nested namespace
that contains a parent namespace that coincides with msgpack. For example:

namespace product {
namespace protocol {
namespace msgpack {

class message
{
.
.
.
MSGPACK_DEFINE(...);
};

}}}

namespace product {
namespace protocol {
namespace protobuf {

class message
{
.
.
.
};

}}}

In this case we are defining a protocol that supports different types of message encodings.
As a result, it is convenient to place code specific to each encoding into a namespace that
takes on the encoding name. Since the MSGPACK_DEFINE(...) marco contains msgpack::* style
declarations, this conflicts with the parent namespace. To fix this, declarations in the
macro have been changed to ::msgpack::* to tell it to explcitly use the msgpack namespace
in the global namespace.