Boost logo

Boost Users :

Subject: [Boost-users] [wave] Wave macro expansion problem
From: Edward Diener (eldiener_at_[hidden])
Date: 2013-09-09 23:23:24

The code:

// test_macros_o.cpp

#define f(a) f(x + (a))
#define x 2
#define g f
#define h g(~

int main()

#pragma wave trace(enable)
   h 5);
#pragma wave trace(disable)

   return 0;

In the latest C++ standard at 16.3.5 paragraph 5 the expansion of
'h 5)' is given as:

f(2 * (~5))

but the wave.exe driver gives:

C:\Programming\VersionControl\boost\libs\vmd\test\test_macros_o.cpp:11:3: h
see macro definition: h
see macro definition: g

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at