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
> there is BOOST_PP_COUNTER/BOOST_PP_UPDATE_COUNTER()(introduced in
> One problem -- if this used in different headers, the generated
> 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
> 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 acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk