
22 Apr
2004
22 Apr
'04
8:45 p.m.
Arkadiy Vertleyb wrote:
There are two problems I can see here. One is related to getting a unique integer (what I am using __COUNTER__ for). I am trying to figure out the portable way of doing this (Paul just showed me something I think can work).
See attached. Instead of __COUNTER__, it is used via GET and SET. SET bumps the value by 1. It can also be used inside functions and namespaces. The attached test.cpp outputs 0 2 4 1 12 with g++ 3.4 (-W -Wall -pedantic) and icc 8.0 (-strict_ansi). Jim