|
Boost : |
From: Steven Burns (royalstream_at_[hidden])
Date: 2006-07-19 15:56:15
Recently I came up with a modified version of boost::array that supports
runtime sized arrays.
The current boost::array implementation is great but every now and then
you'll need runtime-sized arrays: it's simply impossible to know everything
at
compile time.
It is backwards compatible:
boost::array<int, 10> sarray;
but it can be used this way now:
boost::array<int> darray(10);
I realize you could simply use std::vector, but sometimes all you want is a
fixed-size array (but sized at runtime). Besides, I am not sure about the
overhead involved with std::vector for these simple scenarios.
Comments welcome,
Steven
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk