Rephrase your program a bit:
static constexpr auto gma = get_max_arenas(); size_t current_colour[gma];
gives a Clang error:
reading bits of a member of 'union with active value' 'is not allowed in constant expression
The reason you get this error is because the constructor sets value , and then you try to read bits . This is forbidden, as @gurka commented.
Standard Quote:
[expr.const]
2 The conditional expression e is an expression of the kernel constant if the estimate e, following the rules of the abstract machine (1.9), evaluates one of the following expressions:
(2.8) - lvalue-to-r transformation (4.1) or modification (5.18, 5.2.6, 5.3.2), which is applied to a glvalue that refers to an inactive member of a union or its subobject;
source share