|
Boost : |
From: Martin Bonner (martin.bonner_at_[hidden])
Date: 2006-05-25 10:04:54
Thorsten Ottosen wrote:
> Maybe you should just wrap boost::array:
>
> template< class T, unsigned N >
> struct my_array : boost::array<T,N>
> {
> // provide constructors here
How?
> };
You can't construct the base boost_array in the base class
initialization list of the constructor (because boost_array doesn't have
a constructor that takes arguments), and by the time you get into the
body of the my_array constructor it is too late - the boost_array is
already default constructed.
Having said which, personally I think that a seperate class with
constructors would be better than adding another template class to
boost::array.
-- Martin Bonner Martin.Bonner_at_[hidden] Pi Technology, Milton Hall, Ely Road, Milton, Cambridge, CB4 6WZ, ENGLAND Tel: +44 (0)1223 203894
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk