[Bug c++/86049] Array bindings are not const when initializer is
richard-gccbugzilla at metafoo dot co.uk
gcc-bugzilla@gcc.gnu.org
Tue Dec 11 20:38:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86049
--- Comment #5 from Richard Smith <richard-gccbugzilla at metafoo dot co.uk> ---
This was just reported as http://lists.isocpp.org/core/2018/12/5320.php; I
don't believe it's on the core issues list yet.
[@Tomalak, I think the standard is clear here:
"If the assignment-expression in the initializer has array type A and no
ref-qualifier is present, e has type cv A"
Here, A is the array type 'const int[1]' and cv is empty, so e has type 'const
int[1]'. But, as noted in comment#2, that seems like the wrong outcome. It also
contradicts the non-normative note in [dcl.struct.bind]p3, which further
suggests that this outcome was probably not the intent of the wording.]
More information about the Gcc-bugs
mailing list