
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Steven Watanabe Sent: Friday, July 27, 2012 9:19 PM To: boost@lists.boost.org Subject: Re: [boost] [type_erasure] Review started (July 18-27, 2012)
AMDG
The main benefit for this is for type erased function arguments:
typedef mpl::vector< random_access_iterator<_iter>, same_type<random_access_iterator<_iter>::value_type, _a>, less_than_comparable<_a>, move_constructible<_a>, move_assignable<_a>, callable<bool(const _a&, const _a&), _f>, copy_constructible<_f>
sort_requirements;
void sort_impl(iter_type, iter_type, func_type);
// capture the arguments and forward to the // separately compiled implementation template<class Iter, class F> void sort(Iter, Iter, F);
In trying to work up this example, I couldn't find move_constructible and move_assignable - are this a TODO? But should work without this? This also highlighted the usefulness of an index - I tried to build one using b2 --enable-index , but the simple hooks and eyes are missing. There are quite lot of possible requirements, and they each have their include file. Thanks Paul
Requirements like this are very common in generic programming.
The good point is that the reference documentation looks complete and helpful.
In Christ, Steven Watanabe
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost