$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Sascha Krissler (boost-dev_at_[hidden])
Date: 2006-11-11 21:10:51
Hi,
i had this little idea.
when yo want to customize a class with a container like
template <typename T, typename Container>
struct Foo;
then you must instanciate it with:
Foo<int, std::vector<int> >
the second int is redundant.
---
Alternative:
template <typename T, template <typename, typename> class Container> struct Foo;
Here i do not have an allocator for the instantiation of Container.
---
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