Boost logo

Boost :

From: Brad Spencer (spencer_at_[hidden])
Date: 2004-04-13 08:22:08


On Fri, Apr 02, 2004 at 06:02:30PM -0500, David Abrahams wrote:
> Brad Spencer <spencer_at_[hidden]> writes:
>
> > In iterator/iterator_facade.hpp, there are a lot of template arguments
> > that have names like "R1" and "D2". Unfortunately, these "all caps"
> > tokens are fodder for collisions with macros. On i386-pc-solaris2.8,
> > for some reason, "R1" is defined to be "9" (it's some kind of register
> > identification macro)
>
> In what header is it defined? Or does it come from the compiler?

It's in <ia32/sys/reg.h>, which I don't include directly, but ends up
in the compilation. It looks like it's inside some guards (again,
which I am not setting directly), but they must resolve to true.

> There is such a(n informal) policy. Macros with a single capital
> letter are traditionally used for template parameters, and not
> normally used by system headers.

Ok. In this case the macros have a single capital letter and a
number.

> > Just using mixed case (or lower case) is
> > probably enough.
>
> I'm not sure what we should do about this. Adopting that policy
> would require changes to nearly every single Boost header.

Hmmm. What should I do then?

-- 
------------------------------------------------------------------
Brad Spencer - spencer_at_[hidden] - "It's quite nice..."
Systems Architect | InfoInterActive Corp. | A Canadian AOL Company

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk