
12 Nov
2006
12 Nov
'06
2:16 a.m.
Sascha Krissler wrote:
What i would like is:
template <typename T, typename Container> struct Foo { typedef typename mpl::apply<Container, T>::type foo; };
and instantiate it with:
Foo<int, mpl::stl_foo::vector<mpl::placeholder::_1> >
For that i need
namespace boost::mpl::stl_foo { template <typename T, typename Alloc> struct vector { typedef std::vector<T, Alloc> type }; }
so i can curry containers as i wish.
just an idea
Try this instead: using mpl::_; Foo< int, std::vector<_> > :-) -- Eric Niebler Boost Consulting www.boost-consulting.com