
25 May
2006
25 May
'06
2:20 p.m.
Martin Bonner wrote:
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.
What do tou mean by "it's too late"? Since the "construction" of boost::array is a no-op, you can just initialize it in the body my_array's contructors. -Thorsten