Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-07-22 10:23:23

"Arkadiy Vertleyb" <vertleyb_at_[hidden]> writes:

> "David Abrahams" <dave_at_[hidden]> wrote
>> "Arkadiy Vertleyb" <vertleyb_at_[hidden]> writes:
>> > - Whenever the user needs to register her own classes, she provides
>> > identifiers by any means she prefers, such as enum, etc., starting from
>> How will multiple independent users, or libraries that use boost,
>> avoid collisions?
> If the class is registered in a header, it should be registered against a
> symbol somehow produced from the name of this header (in the similar way to
> include guards). If the author of such classes wants to be independent, she
> supplies a separate header, where her symbols are enumerated, looking
> somehing like:
> enum
> {
> ...
> };
> ultimately, at some point, somebody is writing a CPP file. This end user
> has to collect all such headers, and "chain" them in a single header, thus
> emulating a single enum.

That sounds like a serious usability problem to me. Furthermore,
we'll still have an ODR violation if two separately-compiled libraries
do the chaining in different ways. Am I wrong?

Dave Abrahams
Boost Consulting

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