You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it issues the following (see [Compiler Explorer](https://godbolt.org/z/fEoYch83q)):
```none
[<source>:3:24: warning: use designated initializer list to initialize 'array<int, 4>' [modernize-use-designated-initializers]](javascript:;)
3 | std::array small_primes{2, 3, 5, 7};
| ^~~~~~~~~~~~
| .[0]= .[1]= .[2]= .[3]=
/opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/15.0.1/../../../../include/c++/15.0.1/array:102:5: note: aggregate type is defined here
102 | struct array
| ^
1 warning generated.
Interestingly, the suggestion to use .[i]= is completely wrong:
With code like:
it issues the following (see Compiler Explorer):
Interestingly, the suggestion to use
.[i]=
is completely wrong:as the
.
there causes compilation error (Compiler Explorer):Finally, use of the same without
.
:results in other issues (Compiler Explorer):
The text was updated successfully, but these errors were encountered: