Boost logo

Boost :

From: Brad Spencer (spencer_at_[hidden])
Date: 2004-04-02 15:52:57

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) and so instead of:

  template < . . . , class R1, . . . >

we get

  template < . . . , class 9, . . . >

which, of course, doesn't work :)

I've attached a patch against 1.31.0 (the trunk for this file) to fix
this one file by adding "_type" to the end of all such all-caps names.
I have not tested it very well.

Perhaps there should be a policy to avoid names that are likely to
collide with system macros? Just using mixed case (or lower case) is
probably enough.

Thanks for the great software!

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

Boost list run by bdawes at, gregod at, cpdaniel at, john at