|
Boost Users : |
Subject: [Boost-users] [Wave] Making wave driver work with 0 arguments passed as __VA_ARGS__
From: Szymon Kurek (kurek.szymon_at_[hidden])
Date: 2013-08-02 10:55:17
Hello everyone,
I'm porting some g++ code to MSVC, and I'm trying to use the Boost.Wave
driver executable as a preprocessor instead of Visual Studio's. Boost
1.54.0.
I'm generally successful, but I'm having trouble with macros like these:
#define LOG(msg, ...) whatever
Usage examples:
LOG("Hello world!");
LOG("Hello and print out some variables", foo, bar);
Both g++ and MSVC have custom extensions that make these examples work, but
Wave is pretty strict and follows the standard to the letter, so gives the
error message "not enough arguments for macro LOG" for the first example.
I know it's possible to rewrite each macro like this in a
standard-compliant way, but it's a lot of work and gets complicated if I
want recursive macro invocation.
Is it possible to enable this behaviour in wave somehow? Do I need to
compile Wave Driver with a specific option? I searched through the docs and
tried looking at the code, but I can't find anything.
Regards,
Szymon Kurek
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net