|
Boost Users : |
From: Marc Mutz (marc_at_[hidden])
Date: 2006-03-11 13:45:35
Hi,
I'm having a problem with "free" commas in macro expansions. I want to
generate some function declarations (and implementations) from a
user-supplied BOOST_PP_SEQ. The function declarations use enable_if to switch
between two sets of interfaces based on the type that shall be returned.
Nevermind the details, I've just used a trivial enabling condition here, the
error is the same as when using mpl::contains<sometype, Type> in the real
code. I've stripped the problem down and attached a test file, complete with
my documented attempts to delay expansion of the comma somehow. The
preprocessor succeeds when the enable_if or it's two template args are put
into (parentheses), but this is no longer valid C++, of course.
I guess I'm missing something, but I'm at the end of my Latin, as we say in
Germany.
Thanks,
Marc
-- Marc Mutz -- marc_at_[hidden], mutz_at_[hidden] Klarälvdalens Datakonsult AB, Platform-independent software solutions
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