|
Boost : |
From: Chris Little (cslittle_at_[hidden])
Date: 2001-06-08 10:05:34
Dave,
Even if we could wrap the header and redefine nil I don't think I want to.
nil is defined as either 0 or 0L depending on what your target platform is.
Unfortunately there are too many headers and source from Apple and others
that relies on this definition. A quick search through the Mac OS Support
folder for CodeWarrior returned around 4500 occurences. I don't want to
have modify files from Metrowerks or Apple just to make things work.
Chris
> -----Original Message-----
> From: David Abrahams [mailto:abrahams_at_[hidden]]
> Sent: Friday, June 08, 2001 10:30 AM
> To: boost_at_[hidden]
> Subject: Re: [boost] boost::nil
>
>
> Is there something wrong with "null"?
>
> There are more-foolproof ways to #undef nil: you use the
> STLport approach of
> making a wrapper header for the MacOS header which defines
> it. As someone
> who's spent a lot of time programming Macs, I don't think
> this problem is so
> bad that it's worth compromising the design of our library for.
>
> -Dave
>
> ----- Original Message -----
> From: "Chris Little" <cslittle_at_[hidden]>
> To: <boost_at_[hidden]>
> Sent: Friday, June 08, 2001 10:02 AM
> Subject: RE: [boost] boost::nil
>
>
> 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.
>
> Chris
>
> > -----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.
> > #endif
> >
> > somewhere in config.hpp?
> >
> > --
> > jk
> >
>
>
>
> To unsubscribe, send email to:
<mailto:boost-unsubscribe_at_[hidden]>
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk