Hello,
I'm trying to figure out whether boost::multi_array does guarantee any initialization on its elements, since I can't find an explicit mention of this in the docs. I've noticed that all constructors of boost_multi array call the function allocate_space(), which is defined as follows:

    void allocate_space() {
      typename Allocator::const_pointer no_hint=0;
      base_ = allocator_.allocate(this->num_elements(),no_hint);
      this->set_base_ptr(base_);
      allocated_elements_ = this->num_elements();
      std::uninitialized_fill_n(base_,allocated_elements_,T());
    }

Thus, std::uninitialized_fill_n should set all values to their default ones, right? For example, a boost::multi_array containing doubles is guaranteed to be zeroed at constructions, am I correct?

Or are there cases where there's no guarantee of initialization, and that is why the documentation does not mention it?

Thanks in advance.

Best regards,
Eugenio Bargiacchi