hubert-reinterpretcast wrote: Indeed, the new diagnostic is never valid because the permission to name non-static data members in unevaluated operands is not restricted by scope: https://eel.is/c++draft/expr.prim.id.general#4.3
https://gcc.godbolt.org/z/h4eTT984M: ```cpp namespace std { template <typename, typename> struct is_same { static constexpr bool value = false; }; template <typename T> struct is_same<T, T> { static constexpr bool value = true; }; } struct S { int x; static_assert(std::is_same<decltype((S::x)), int &>::value, ""); static_assert(std::is_same<decltype(&(S::x)), int *>::value, ""); }; static_assert(std::is_same<decltype((S::x)), int &>::value, ""); static_assert(std::is_same<decltype(&(S::x)), int *>::value, ""); ``` https://github.com/llvm/llvm-project/pull/89713 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits