Boost logo

Boost :

From: Sebastian Faust (sfaust_at_[hidden])
Date: 2003-11-15 21:10:57


Thanks a lot... it works now :)

-----Ursprüngliche Nachricht-----
Von: boost-bounces_at_[hidden]
[mailto:boost-bounces_at_[hidden]] Im Auftrag von Richard Crossley
Gesendet: Sonntag, 16. November 2003 02:25
An: 'Boost mailing list'
Betreff: RE: [boost] boost::mpl create objects of types in a typelist

Hi Sebastian,

> template <typename T = boost::mpl::_1>
> struct tag{};
>
> template <typename C>
> struct mv{
> template <typename T>
> void operator()(tag<T>)
> {
> m_c.insert(std::make_pair(T::_key, typename
C::value_type(new T)));
> }
> mv(C& v):m_c(v){}
> private:
> C& m_c;
> };

Change value_type to mapped_type. e.g.

m_c.insert(std::make_pair(T::_key, typename C::mapped_type(new T)));

Regards,

Richard.

_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost


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