Boost logo

Boost :

From: Matthias Schabel (boost_at_[hidden])
Date: 2007-03-02 13:04:02

>> where I don't really care what the specific order is, just that the
>> ordinal values are unique... Anyone have a bright idea on how to
>> accomplish this? Preprocessor?
> Yes, the preprocessor can be used. VC++ has a __COUNTER__
> extension. Also
> 1.34).
> One problem -- if this used in different headers, the generated
> numbers
> depend on the order of includes, which potentially can lead to the ODR
> violation :-(

Sigh. This seems like something that ought to get language support...

> I once thought that the problem may be solved by compile-time GUID,
> but for
> me four numbers instead of one didn't work... but if you want
> _anything_
> less_than_comparable, this might be an option.

I'm not familiar with compile-time GUIDs - where is this discussed?


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