Boost logo

Boost :

Subject: Re: [boost] [type_erasure] RFC: New version
From: lcaminiti (lorcaminiti_at_[hidden])
Date: 2012-05-14 08:21:09


Hi Steven,

Steven Watanabe-4 wrote
>
> I've just committed an updated version of
> my type_erasure library to the sandbox
> at http://svn.boost.org/svn/boost/sandbox/type_erasure.
>

Can you please commit HTML docs too?

> Highlights of this version:
>
> * Simplified primitive concept definitions.
> Now, all it takes is:
>
> template<class T = _self>
> struct incrementable {
> static void apply(T& t) { ++t; }
> };
>
> * Support for associated types
> and same_type. This allows
> defining iterator concepts
> in a uniform way:
>
> typedef mpl::vector<
> forward_iterator<>,
> same_type&lt;forward_iterator&lt;&gt;::value_type, _a>,
> copy_constructible<_a>,
> typeid_<_a>
>> concept;
>
> std::vector<int> vec(10);
> for(any<concept> first(vec.begin()), last(vec.end());
> first != last; ++first)
> {
> std::cout << any_cast&lt;int&amp;&gt;(*first) << std::endl;
> }
>
> Now, _a automatically binds to int.
>
> The core library is now feature complete.
> Once I finish updating the iterator
> concepts, I think this should be ready
> for a formal review. Any thoughts, comments,
> or criticism is greatly appreciated.
>

Boost.Generic claims to support the following (but perhaps Matt is no longer
developing this library):
Associate Types -- Yes
Associate Functions -- Yes
Multi-type Concepts -- Yes
Concept Maps -- Yes
Archetypes -- Yes
Concept Refinement -- Yes
Typename Deduction -- Yes
Concept-Based Overloading -- Almost

How much of this can your library do?

Thanks a lot!
--Lorenzo

--
View this message in context: http://boost.2283326.n4.nabble.com/type-erasure-RFC-New-version-tp4629909p4630068.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

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