|
Boost : |
From: rwgk (rwgk_at_[hidden])
Date: 2002-01-30 19:39:54
--- In boost_at_y..., "Andrei Alexandrescu" <andrewalex_at_h...> wrote:
> But if you want to have a nice family of containers, you don't
define one
> for each constraint. Such a proliferation would be undesirable. Why
add all
> that cruft whn it's not needed? You divide the class along various
> characteristics and you implement them separately.
This sounds interesting.
From your article:
typedef flex_string<
char,
std::char_traits<char>,
std::allocator<char>,
SmallStringOpt<char, 5,
CowString<char, AllocatorStringStorage<char,
std::allocator<char> > > >
> String;
This is a mouth full. Is there a way to present the
various end-user types in a concise way?
I just tried this:
template <typename A, typename B>
struct generic {
A a;
B b;
};
template <typename A, typename B = int>
typedef generic<A, B> specific;
EDG245 barfs, as expected. Is there a way to achieve what
this example attempts?
Thanks,
Ralf
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk