hubert-reinterpretcast wrote: For info, the cases where the _id-expression_ is transformed into a class member access expression (`q` and `h` below) do not run into this code (see https://cplusplus.github.io/CWG/issues/2902.html regarding said transformation): ```cpp #include <type_traits> struct S { int x;
bool q = std::is_same_v<decltype(&(S::x)), int *>; // OK static void f() { static_assert(std::is_same_v<decltype(&(S::x)), int *>, ""); // OK } void g(this const S &) { static_assert(std::is_same_v<decltype(&(S::x)), int *>, ""); // OK } void h() const { static_assert(std::is_same_v<decltype(&(S::x)), const int *>, ""); // OK } }; static_assert(S{0}.q); ``` 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