1 Jun 2011 01:12
Re: [contract] syntax redesign
Matt Calabrese <rivorus <at> gmail.com>
2011-05-31 23:12:37 GMT
2011-05-31 23:12:37 GMT
On Tue, May 31, 2011 at 6:35 PM, lcaminiti <lorcaminiti <at> gmail.com> 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
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
RSS Feed