Boost logo

Boost Users :

From: kila suelika (semeegozy_at_[hidden])
Date: 2020-11-22 05:07:08


As you don't give any example, I can't know exactly what you want to do.
But how about using multi_array to store pointers? Then you can construct
your objects at any time.

On Fri, Nov 20, 2020 at 11:55 PM Eugenio Bargiacchi via Boost-users <
boost-users_at_[hidden]> wrote:

> I'd love to be able to use multi_array with classes that do not have a
> default constructor. At the moment, this is impossible, as both the
> constructor and resize functions only take extents as arguments (and
> possibly some other options), but no value_type, as for example std::vector
> does. Thus, trying to store objects without a default constructor in a
> multi_array results in hard compiler errors, with no workaround that I know
> of.
>
> This happens to me fairly often, as I use multi_array to organize sets of
> complex objects. If there is a technical reason why this is not possible, I
> would also be happy to learn it.
>
> Best regards,
> Eugenio Bargiacchi
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users
>



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