[libcxx-commits] [PATCH] D60368: Add bind_front function (P0356R5)

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 3 17:23:49 PST 2021


zoecarver added inline comments.


================
Comment at: libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp:149
 #if defined(_LIBCPP_VERSION)
-        ret = ret2;
-        assert(ret() == true);
-        assert(ret2() == true);
+        if (!std::is_constant_evaluated()) {
+            ret = ret2;
----------------
@ldionne I did have one problem after rebasing. Because this is implemented with `std::tuple`, the assignment operator isn't constexpr. I see a few options here: 

1. Wait to land this until we implement constexpr assignment operators for `std::tuple`.
2. Add the above check (`is_constant_evaluated`) to this test and remove it once constexpr assignment operators for `std::tuple` are implemented.
3. Just remove this part of the test entirely because it's not required by the standard. 
4. Update `std::tuple` to have constexpr assignment operators (without properly implementing the paper).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60368/new/

https://reviews.llvm.org/D60368



More information about the libcxx-commits mailing list