|
Boost : |
From: Reid Sweatman (reids_at_[hidden])
Date: 1999-06-22 14:35:49
Right. I didn't mention the single underscore for global namespace because
it's so obviously lethal to use it under most compilers. I was thinking
more of the ones I once inadvertantly tripped over <g>. I set up a set of
editor macros a long, long time ago (a long time ago...to quote good old
Alec G.) that used symbols beginning and ending with double underscores as
header sentries. Don't think it was illegal back when, and actually, I've
never had a compiler choke on them. Still, when I read that section of the
current spec, I promptly changed my macros, in the interest of avoiding some
hard-to-track bug in future code.
> -----Original Message-----
> From: Greg Colvin [mailto:greg_at_[hidden]]
> Sent: Tuesday, June 22, 1999 12:07 PM
> To: boost_at_[hidden]
> Subject: [boost] Re: result of compose discussion
>
>
> From: Reid Sweatman <reids_at_[hidden]>
> > > From: Greg Colvin [mailto:greg_at_[hidden]]
> > ...
> > > > but I think that leading underscores are discouraged by the
> > > C++ standard.
> > >
> > > Not just discouraged, but reserved for the implementor and
> > > forbidden to the
> > > user.
> >
> > Unless the spec has changed since I last looked, the
> symbols reserved to
> > implementation use were those that contained double
> underscores and those
> > that began with an underscore followed by a capital letter.
>
> 17.4.3.1.2 Global names [lib.global.names]
>
> 1 Certain sets of names and function signatures are always
> reserved to
> the implementation:
>
> --Each name that contains a double underscore __) or
> begins with an
> underscore followed by an uppercase letter (_lex.key_)
> is reserved
> to the implementation for any use.
>
> --Each name that begins with an underscore is reserved to
> the imple-
> mentation for use as a name in the global namespace.22)
>
> 22) Such names are also reserved in namespace ::std
> (_lib.re-
> served.names_).
>
>
>
>
> --------------------------------------------------------------
> ----------
> Don't let the next virus knock you out! Special Offer to
> eGroups members
> Install @Backup by June 30th and win a $100 Gift Certificate
> from Amazon
> .com and @Backup free for a year!
http://clickhere.egroups.com/click/363
eGroups.com home: http://www.egroups.com/group/boost
http://www.egroups.com - Simplifying group communications
------------------------------------------------------------------------
eGroups.com home: http://www.egroups.com/group/boost
http://www.egroups.com - Simplifying group communications
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk