[libcxx-commits] [libcxx] [libc++] Fix ill-formed return in function_ref's static-call path (PR #228868)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Oct 4 04:36:24 PDT 2026
================
@@ -93,6 +93,11 @@ struct TrackCopyMove {
}
};
+struct StaticallyCallable {
+ static inline int static_call_count = 0;
----------------
huixie90 wrote:
nit: rather than mutating a global variable in the test, I would prefer passing an argument to the operator() and mutate the argument to achieve the check. that way you avoid writing the code that restores this variable in every single test point.
https://github.com/llvm/llvm-project/pull/228868
More information about the libcxx-commits
mailing list