Boost logo

Boost Users :

Subject: Re: [Boost-users] [Boost.MultiArray]: size question
From: Larry Evans (cppljevans_at_[hidden])
Date: 2012-12-17 20:50:58


On 12/17/12 15:24, gast128 wrote:
> Larry Evans <cppljevans <at> suddenlink.net> writes:
>
>>
>> On 12/17/12 14:14, gast128 wrote:
>>> This gives at least an assert:
>>>
>>> BOOST_ASSERT(size_type(idx - index_bases[0]) < extents[0]);
>>>
>>> Isn't there a better solution?
>>
>> Are you referring to multi_array for the array_dyn alternative
>> mentioned in my OP? Or this this reply not intended for me?
>>
>> Could you provide the complete program that has this statement in it?
>>
>> I've grepped files here:
>>
>> http://svn.boost.org/svn/boost/sandbox/variadic_templates/sandbox/array_dyn
>>
>> for extents, and found none; hence, I'm confused :(
>
>
> I am talking about multi_array, see title. Example code:
>
You did mention alternatives in your OP:

  is there a better alternative?

and array_dyn.hpp is an alternative which, as shown by the
example runs, doesn't have a problem with 0 sized dimensions.
Of course maybe you meant a better alternative which still
used Boost.MultiArray; however, that was not clear from your OP;
hence, I supplied the array_dyn alternative.

-regards,
Larry


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net