[libcxx-commits] [libcxx] [libc++] Implement part of P2562R1: constexpr `std::inplace_merge` (PR #129008)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 4 23:19:11 PST 2025


================
@@ -41,14 +41,17 @@ struct binary_counting_predicate {
     typedef Arg2 second_argument_type;
     typedef bool result_type;
 
-    binary_counting_predicate ( Predicate p ) : p_(p), count_(0) {}
-    ~binary_counting_predicate() {}
+    TEST_CONSTEXPR_CXX20 binary_counting_predicate(Predicate p) : p_(p), count_(0) {}
+    TEST_CONSTEXPR_CXX20 ~binary_counting_predicate() {}
----------------
frederick-vs-ja wrote:

This doesn't work because we need to construct `binary_counting_predicate` objects.

IIUC implicitly declared (defaulted) destructor should works. Although I'm not sure whether it was intended not to use defaulted destructors.

https://github.com/llvm/llvm-project/pull/129008


More information about the libcxx-commits mailing list