Boost and Mac OS X SDK 'nil' Conflicts

There doesn't appear to be an issue for this in Trac or any semblance of a
discussion thread; however, the Mac OS SDK definition of 'nil' seems to
cause Boost 1_39_0 (perhaps other versions) to emit a copious number of
warning and error messages when included AFTER any OS X SDK header such as:
#include

AMDG Grant Erickson wrote:
There doesn't appear to be an issue for this in Trac or any semblance of a discussion thread; however, the Mac OS SDK definition of 'nil' seems to cause Boost 1_39_0 (perhaps other versions) to emit a copious number of warning and error messages when included AFTER any OS X SDK header such as:
#include
#include #include
#include #include using namespace boost; using namespace accumulators;
As near as I can tell CoreServices/MacTypes.h is the source of the definition:
#define nil NULL
Fortunately, this can be resolved by reordering the include directives to include OS X headers AFTER Boost; however, it seems like these headers should play nicely together.
Has Boost reserved 'nil' for some time or might something like 'nil_t' be used alternatively?
Boost is only using nil inside its own namespace, so the problem is really that nil should not be defined as a macro. In Christ, Steven Watanabe
participants (2)
-
Grant Erickson
-
Steven Watanabe