https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92171
Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mpolacek at gcc dot gnu.org --- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> --- I think this is another example: template<int N> struct A { static constexpr int size() { return N; } }; template<typename T> void f1(T t) { constexpr int k = t.size(); } template<typename T> void f2(const T &t) { constexpr int k = t.size(); // error } template<typename T> void f3(const T &t) { constexpr int k = T::size(); } void g(A<3> a) { f1(a); f2(a); f3(a); }