Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-07-06 12:40:33


I have a sneaking feeling I might be a priniciple culprit here.

Steve Clamage wrote:
> You can't use a static template in a global template function because
> it violates the One-Definition Rule, among possibly other rules.

Could you expand upon this a little more? I don't see the ODR violation or
other rule violation.

> I have found that other compilers accept this code, but reject it when
> you put them in standard-conformning mode. (To see the rejection with
> some compilers, you need to build the executable.)

> How critical to BOOST is this style of coding? Could the static
> templates be made global?

Generally we aspire to make our code conform to the standard. If its not,
then we're interested in changing it so it is. Having said that, It's often
very difficult to figure out what the standard means. Of course the fact
that different compilers behave differently also makes it hard.

Of course if you want to make your compiler available to library writers at
a reasonable cost (i.e. free) you might manage to shift some work on to us.

Robert Ramey


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