
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. Thanks!

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
participants (2)
-
Igor R
-
joel