https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125439
--- Comment #2 from Steve Ward <planet36 at gmail dot com> --- (In reply to Jonathan Wakely from comment #1) > Read the definition of signed and unsigned integers types, it's a list of > types that does not include cv-qualified versions of those types. > > Contrast that with https://eel.is/c++draft/basic.fundamental#11 which says > "the signed and unsigned integer types, and cv-qualified versions > ([basic.type.qualifier]) thereof". If signed and unsigned integers types > already included const versions, it wouldn't need to say "and cv-qualified > versions thereof". Sorry, I don't follow your reasoning. The linked definition seems to support the example: `const int` is an integer type. My example program was a little contrived. Here's a succinct example showing that gcc (trunk) does not compile, but clang (trunk) with libc++ succeeds. https://godbolt.org/z/YdEoPjd8o
