From: Glen Fernandes (glen.fernandes_at_[hidden])
Date: 2020-01-24 16:10:01
> So if T and T[N] are valid, then T[N][M] should also be. This increases
the scope greatly but has an incredible difficult questions to answer: What
would operator return? I don't have a good answer...
Simple questions that already have an answer:
The same way shared_ptr<T[N][M]> works today. :)
Its operator returns element_type&
auto p = allocate_shared<int>(alloc);
p = 8;
auto q = allocate_unique<double>(alloc, size);
q[index] = 0.95;
dynamic<int, Allocator> a(alloc);
a = 8;
i.e. Making it work for T[N] also automatically makes it work for T[N][M].
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk