It is a design flaw but it has been around a long time. nil is Pascal's NULL. All of the Mac OS's system interfaces were originally defined as Pascal and nil has been in the system headers since 1984.
Attempting to #undef a system constant is doomed to failure. It would be very sensitive to include ordering. Think of it like trying to redefine NULL.
Jeremy suggests in another email that boost::nil be renamed boost::null_pointer or something like that. I believe this is the route to take.
> -----Original Message-----
> From: email@example.com [mailto:firstname.lastname@example.org]
> Sent: Friday, June 08, 2001 9:44 AM
> To: email@example.com
> Subject: Re: [boost] boost::nil
> 8 Jun 2001 17:23:45 +0400 Chris Little ΞΑΠΙΣΑΜ:
> >On a Mac, nil is a preprocessor macro included in the system
> headers as a
> Exactly that way, lowercase macro? Then this is BIG design
> flaw in MacOS.
> >legacy of the days when the OS had a Pascal interface.
> How about something like
> #ifdef nil
> #undef nil
> void * const nil=0; // or what appropriate, in global namespace.
> somewhere in config.hpp?