multi_array resize question

Hi, The documentation from multi_array says that if elements are added while reszize is called, the new elements are initialized with the default constructor. I have the following: typedef boost::multi_array

Subject: [Boost-users] multi_array resize question
Hi,
The documentation from multi_array says that if elements are added while reszize is called, the new elements are initialized with the default constructor. I have the following:
typedef boost::multi_array
What is the default constructor of a pointer?
Or do need to do the following:
class ptr { public: ptr() { p = 0; } Object *p; }
typedef boost::multi_array
Array_Type; ... to get all new elements to bee zero-pointers?
Thanks for help.
regards
W. Holzke
try
typedef boost::multi_array

AMDG Wilfried Holzke wrote:
The documentation from multi_array says that if elements are added while reszize is called, the new elements are initialized with the default constructor. I have the following:
typedef boost::multi_array
What is the default constructor of a pointer?
Or do need to do the following:
class ptr { public: ptr() { p = 0; } Object *p; }
typedef boost::multi_array
Array_Type; ... to get all new elements to bee zero-pointers?
Actually, the new elements are value initialized, rather than default constructed, so pointers will be 0. In Christ, Steven Watanabe
participants (3)
-
Max
-
Steven Watanabe
-
Wilfried Holzke