Boost logo

Boost :

From: Sid Sacek (ssacek_at_[hidden])
Date: 2007-12-04 04:06:23

>> __LINE__ is not unique in a translation unit. For each included header, it
>> is restarted from 1.
>> So if you happen to use _COUNTER in two boost header files at the same line,
>> and the two headers are included by the same c++ file, you end up with
>> clashing counters.
>> Corrado

You totally missed the point!

Macros like _COUNTER are not meant to be expanded inside of header files. They're designed to expand inside cpp source files, or be
used as part of other macros.

We all know what the limitations of __LINE__ are, we learned that stuff 20 years ago!

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