
12 Nov
2006
12 Nov
'06
5:26 a.m.
Sascha Krissler wrote:
On Sat, Nov 11, 2006 at 06:16:26PM -0800, Eric Niebler wrote:
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<_> >
:-)
std::vector is not a metafunction, it has no ::type
It doesn't matter. Try it and see. -- Eric Niebler Boost Consulting www.boost-consulting.com