|
Boost : |
From: Sascha Krissler (boost-dev_at_[hidden])
Date: 2006-11-11 21:33:04
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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk