Boost logo

Boost :

From: Jan Bares (herkule9s_at_[hidden])
Date: 2004-04-21 02:00:45

In fact I belive that __COUNTER__ was introduced because the solution with
__LINE__ did not worked when you compile with Edit & Continue ON. In that
case the __LINE__ was in fact a variable.


"Paul Mensonides" <pmenso57_at_[hidden]> wrote in message
> > -----Original Message-----
> > From: boost-bounces_at_[hidden]
> > [mailto:boost-bounces_at_[hidden]] On Behalf Of Arkadiy Vertleyb
> > The MS preprocessor has the __COUNTER__ extension that
> > expands to the next integer every time when used. Can
> > something like this be achieved in a portable manner, maybe
> > with the help of Boost.Preprocessor library?
> The best you can do in standard C++ is __LINE__. If you need varying
> all in the same place (i.e. the same header), you can manually keep track
of a
> counter. It is also possible to hijack the #include mechanism to provide
> different number each time a file is included or something like that. In
> case, the ways of doing it are a lot more heavyweight than __COUNTER__,
but a
> lot more standard too.
> Regards,
> Paul Mensonides
> _______________________________________________
> Unsubscribe & other changes:

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