|
Boost : |
Subject: Re: [boost] [contract] syntax redesign
From: Matt Calabrese (rivorus_at_[hidden])
Date: 2011-05-31 19:12:37
On Tue, May 31, 2011 at 6:35 PM, lcaminiti <lorcaminiti_at_[hidden]> wrote:
>
> For example? (Just so I understand this case correctly.)
>
//////////
CONTRACT_FUNCTION(
public template( class T, class Alloc )
void (push_back)( (BOOST_IDENTITY_TYPE((std::vector< T, Alloc >&))) vector_,
(const T&) element ) {
vector_.push_back(element);
}
//////////
In the above case, since the first parameter type actually ends up being the
result of a metafunction invocation, you can't simply call the function by
doing this_.push_back( an_instance_of_std_vector, 4 ). T and Alloc can no
longer be deduced.
-- -Matt Calabrese
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk