|
Boost : |
From: Synge Todo (wistaria_at_[hidden])
Date: 2002-02-05 16:41:05
From: "AlisdairM" <AlisdairM_at_[hidden]>
Date: Tue, 5 Feb 2002 21:08:14 -0000
> I've not had a chance to look at the submission yet, but I must ask why
> these 2 are necessary?
>
> If the fixed_* templates are drop-in replacements for their STL namesakes,
> then shouldn't the STL adaptors work unmodified?
The std::stack and std::queue adaptors should work well of course.
What I have done is just simply adding a static constant,
"static_max_size", to there interface. Here is the complete
implementation of my fixed_capacity_stack.
template<class T, std::size_t N,
template<class, std::size_t> class C = fixed_capacity_vector>
class fixed_capacity_stack : public std::stack<T, C<T, N> >
{
public:
static const std::size_t static_max_size = C<T, N>::static_max_size;
}; // fixed_capacity_stack
Synge Todo
wistaria_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk