https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118139
Bug ID: 118139
Summary: Broken diagnostic: 'decltype_type' not supported by
pp_cxx_unqualified_id
Product: gcc
Version: 14.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: arthur.j.odwyer at gmail dot com
Target Milestone: ---
https://godbolt.org/z/fPjoqMrYs
template<class T>
struct CW {
using V = typename decltype(T())::type;
static void operator=(int) requires requires(V x) { x; } {}
};
<source>:4:15: error: 'static void CW<T>::operator=(int) requires
requires(typename'decltype_type' not supported by pp_cxx_unqualified_id::type
x) {x;}' must be a non-static member function
4 | static void operator=(int) requires requires(V x) { x; } {}
| ^~~~~~~~
Notice the part in the middle: "'decltype_type' not supported by
pp_cxx_unqualified_id". GCC is correct to emit *an* error message, but the
error message shouldn't itself contain an error! :)
Reproduces back to the dawn of Concepts (i.e. GCC 6.1 with -fconcepts).