https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102229

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
The standard isn't very clear on this point; it seems like a core issue.

9.2.6/10: A constexpr specifier used in an object declaration declares the
object as const.

9.2.9.6.2/2.2: for a variable declared with a type that contains a placeholder
type, T is the declared type of the variable and E is the initializer.

/5: If the placeholder-type-specifier is of the form type-constraint opt
decltype(auto), T shall be the placeholder alone.

The question is whether constexpr adds const before deduction (so it's part of
"the declared type of the variable") or after.  The latter interpretation seems
more useful, so let's go with that.

Reply via email to