Boost logo

Boost :

From: Terje Slettebø (tslettebo_at_[hidden])
Date: 2003-04-17 05:28:52


Is there some way (using PP-lib, or whatever), to pass a template-id with
more than one parameter (thus, it contains at least one comma), to a macro?

E.g.:

#define TEST(a) test<a> t;

TEST(std::pair<char,int>) // Won't work

Maybe some sort of variation of BOOST_PP_IDENTITY:

#define BOOST_PP_IDENTITY1(a) a
#define BOOST_PP_IDENTITY2(a,b) a,b
#define BOOST_PP_IDENTITY3(a,b,c) a,b,c

etc.

TEST(BOOST_PP_IDENTITY2(std::pair<char,int>)) // Now ok

Regards,

Terje


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk