Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-09-16 09:57:43


Peder Holt <peder.holt_at_[hidden]> writes:

> What remains then is to decide which of the two template registration
> schemes should be used:
> REGISTER_TEMPLATE(type,2,(typename,int)) or
> REGISTER_TEMPLATE(type,(typename)(int))

I generally dislike interfaces that require counting, so prefer #2.
However, in MPL's new assertions we were able to avoid the big
problems with parenthesization and commas in the PP by actually using
a parenthesized macro argument to form the argument list of a function
type, so in:

        BOOST_MPL_ASSERT((is_same<std::pair<int,int>, B>))

a function type is formed, something like:

         int (*)(is_same<std::pair<int,int>, B>)

I don't know whether that's possible in this case, but if so it's a
significant usability win.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

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