|
Boost : |
Subject: Re: [boost] [contract] syntax redesign
From: Matt Calabrese (rivorus_at_[hidden])
Date: 2011-05-31 18:17:56
On Tue, May 31, 2011 at 5:59 PM, lcaminiti <lorcaminiti_at_[hidden]> wrote:
>
> Boost.Local's BOOST_IDENTITY_TYPE can be used to handle un-parenthesized
> commas within macro parameters (see
> http://svn.boost.org/svn/boost/sandbox/local/boost/utility/identity.hpp).
>
Ah, so for a user to specify a return type of array< int, 2 >, they'd do:
(BOOST_IDENTITY_TYPE((array<int,2>)))(function_name)(params) cv-qualifiers?
That's great. You seem to be putting a lot of effort into supporting
compilers both with and without variadics.
The only problem I can think of is that the IDENTITY_TYPE kind of trick
doesn't work for function parameters where the template argument is to be
automatically deduced. For that case, I think variadics are unfortunately
necessary.
-- -Matt Calabrese
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk