|
Boost Users : |
Subject: Re: [Boost-users] [mpl] type --> wrapper<type>
From: joel (joel.falcou_at_[hidden])
Date: 2009-07-19 11:38:41
Igor R wrote:
> Hello,
>
> How to do in mpl the following:
>
> template<template<class> class wrapper, class arg> struct wrap
> {
> typedef wrapper<arg> type;
> };
>
> Particularly, I've got a sequence of types, and I have to get
> shared_ptr's of these types.
>
>
no need for template template class, use lambda meta-function.
template<class Seq>
struct add_shared_ptr: mpl::transform<Seq, shared_ptr<mpl::_> >{};
typedef add_shared_ptr< mpl::vector<int,char,long> >::type shared_ptr_seq;
-- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net