From: Chris Little (cslittle_at_[hidden])
Date: 2001-06-08 09:02:29
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
Jeremy suggests in another email that boost::nil be renamed
boost::null_pointer or something like that. I believe this is the route to
> -----Original Message-----
> From: jk_at_[hidden] [mailto:jk_at_[hidden]]
> Sent: Friday, June 08, 2001 9:44 AM
> To: boost_at_[hidden]
> 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?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk