[clang] [Clang] fix static operator()/[] call not evaluating object (PR #78356)
Mital Ashok via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 19 03:28:05 PST 2024
================
@@ -598,3 +600,27 @@ namespace B {
}
void g(B::X x) { A::f(x); }
}
+
+namespace static_operator {
+#if __cplusplus >= 201703L
----------------
MitalAshok wrote:
No way to modify things in a C++11/14 constexpr function (`++x` is not a constant expression), so no way to make a positive test that the expression was evaluated. Though I guess I should have done `(non_constexpr_fn(), X())()` and see if that failed.
https://github.com/llvm/llvm-project/pull/78356
More information about the cfe-commits
mailing list