|
Boost Users : |
From: Hicham Mouline (hicham_at_[hidden])
Date: 2008-02-27 03:07:52
hi,
in an ealier post, i was helped to write explicit template instantiations as:
#define FINH1 (EC)(EP)(AC)(AP)
#define FINH2 (C)(D)(E)(F)(G)
#define FINH3 (2)(3)
#define M(r, product) template class Tree<BOOST_PP_SEQ_ENUM(product)>;
BOOST_PP_SEQ_FOR_EACH_PRODUCT(M, (FINH1)(FINH2)(FINH3))
That nicely generated:
template class Tree<EC,C,2>;
template class Tree<EC,C,3>;
template class Tree<EC,D,2>;
template class Tree<EC,D,3>;
...
what i need now is coupling FINH2 and FINH3 (i don't want their crossproduct) as in:
#define FINH1 (EC)(EP)(AC)(AP)
#define FINH2 (C,2)(D,2)(E,3)(F,3)(G,3)
#define M(r, product) template class Tree<BOOST_PP_SEQ_ENUM(product)>;
BOOST_PP_SEQ_FOR_EACH_PRODUCT(M, (FINH1)(FINH2))
But that does't work because the commas in FINH2 are taken as macro arguments which fails...
ideas are appreciated...
regards,
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