Boost logo

Boost Users :

From: John Maddock (jz.maddock_at_[hidden])
Date: 2021-08-03 16:40:03

On 03/08/2021 07:34, Claudio La Rosa via Boost-users wrote:
> Hi to all,
> I unsuccessfully  tried to use a boost multiprecision variable
> (object?) as index of an array.
> Int myArray[100];
> uint128_t index = 23;
> int value = myArray[index];
> This code don’t work.
> There is a way for to use a multiprecision as index of an array?
You would need to explicitly cast the variable to a std::size_t.

But I would rather question the wisdom of using a multiprecision type in
that context?


This email has been checked for viruses by Avast antivirus software.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at