Stefan Schulze Frielinghaus <[email protected]> writes: > From: Stefan Schulze Frielinghaus <[email protected]> > > What is a bit unfortunate is that designators for arrays known from C > are not supported in C++. Therefore, for a constant-like initialization > I had to resort to a lambda expression wrapping the array in a > std::array. What is especially annoying about this is that > std::array::operator[] is not constexpr in C++14 but in C++17. Luckily > GCC defaults to C++20 in the meantime which means at least for an > ordinary bootstrap a constexpr operator[] becomes available such that > the arrays end up in a read-only data section. Once the C++ standard is > bumped to C++17 for GCC itself, the arrays should be marked as constexpr > in order to guarantee that those end up in read-only data sections > indeed.
See https://inbox.sourceware.org/gcc-patches/[email protected]/ as well. > [...] sam
signature.asc
Description: PGP signature
