Boost logo

Boost :

Subject: Re: [boost] Interest in multi-dimensional array class templates.
From: Larry Evans (cppljevans_at_[hidden])
Date: 2011-06-24 15:36:53

On 06/23/11 15:57, Brian Smith wrote:
> The design of the arrays closely follows that provided by the
> language. For fixed-size static arrays the data member is an intrinsic
> array whose type is determined from the template arguments passed,

which type, AFAICT, is calculated by boost::maps::detail::array_type
in boost/maps/support/generic.hpp (around line 84).

> the
> obvious difference for non-static arrays is the data member's type,
> which for an N-dimensional array is the requested element type with N
> pointer symbols appended.

which type, AFAICT, is calculate by boost::maps::pointer_type, again
in generic.hpp (around line 66).

However, even after reading the docs at:


I'm still unable to infer any advantage to using anything other
than the default allocator and thereby avoid this:

  runtime construction requires five memory allocations

which occurs with any non-default allocator.

Brian, could you explain the advantage of using an allocator
other than null::allocator?

BTW, could you point out where the "five memory allocations" occur?
I've looked at the code some without success so far, but it would be
nice if you could just point it out since you know exactly where it is.




Boost list run by bdawes at, gregod at, cpdaniel at, john at