Boost logo

Boost :

Subject: Re: [boost] Is there a thin array wrapper/proxy lying around somewhere?
From: Mostafa (mostafa_working_away_at_[hidden])
Date: 2013-11-25 04:22:34


On Mon, 25 Nov 2013 00:02:17 -0800, Andrey Semashev
<andrey.semashev_at_[hidden]> wrote:

> On Sunday 24 November 2013 23:42:15 Mostafa wrote:
>> (Yes, I'm aware of boost.array, boost.multiarray, and std::vector.) Is
>> there any thin but complete array wrapper/proxy lying around somewhere
>> in
>> boost? A class that if substituted for an array will behave just like
>> the
>> substituted array?
>
> Umm, could you explain why Boost.Array doesn't qualify?
>
Because it does not meet the stated requirements. For one, it doesn't have
operator+, two, it doesn't have the necessary implicit
conversion-to-pointer operator, three regular arrays can't be assigned to,
etc ...

To be more clear, what is desired is a type that mimics all (well, I can
live with almost all [1]) the functionality of a regular array, no more,
no less.

[1] Initialization with array initializor list might be impossible to do
in C++03.

Hope that clarifies,

Mostafa


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk