lists.preview.boost.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview
thread

[Boost-users] passing comma to macro

Warlich, Christof (Christof)

13 Mar 2008 13 Mar '08
1:07 p.m.

Hi, the following code does not compile: #include #include #include #include <iostream> class A {}; int main(void) { BOOST_PP_IIF(boost::is_convertible::value, // condition std::cout << "ifbranch";, // then std::cout << "elsebranch";); // else return 0; } With gcc, it gives the following errors: tst.cc:9:30: error: macro "BOOST_PP_IIF_I" passed 4 arguments, but takes just 3 tst.cc: In function int main(): tst.cc:7: error: BOOST_PP_IIF_I was not declared in this scope I would have expected that BOOST_PP_COMMA() has just been provided to deal with cases like this! I'm just new to Boost, so my apologies if I have overseen something obvious. Thanks for any help, Christof

Attachments:

  • attachment.html (text/html — 3.0 KB)
0 0
Reply
Sign in to reply online Use email software

Back to the thread

Back to the list

HyperKitty Powered by HyperKitty version 1.3.9.