In my own multi-array like class, I faced this dilemma. What I did was using template boost::parameters to specify policy on allocation in the type and had the user make choice between throwing, static_asserting, silently reallocating, preserving order etc
can you illustrate a little bit your design? Is the policy part of the state of the class? Is your multi_array class written on top of Boost.MultiArray. If not did that require small amount of code or basically another gargantuan sized library? Didn't you have problems with all the other derived type like subarrays and array_views, or you just didn't need them.
Why not using such policies ? I know it involves drastically changing multi_array interface but maybe it's worth the hassle.
why the "interface changes"? (except for the a redefined operator= I guess) Thank you, Alfredo