Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2006-11-11 21:16:26


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

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk