[libcxx-commits] [PATCH] D65721: Make rotate a constexpr

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Sep 14 12:43:32 PDT 2020


ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.

This almost LGTM. You can commit after fixing those comments and I'll adjust the markup for AppleClang as needed.



================
Comment at: libcxx/include/algorithm:1940
 {
+#ifndef _LIBCPP_HAS_NO_BUILTIN_IS_CONSTANT_EVALUATED
+    if (__libcpp_is_constant_evaluated())
----------------
Same here, `_LIBCPP_HAS_NO_BUILTIN_IS_CONSTANT_EVALUATED` isn't needed.


================
Comment at: libcxx/test/std/algorithms/alg.modifying.operations/alg.move/move_backward.pass.cpp:87
 
+#if TEST_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_BUILTIN_IS_CONSTANT_EVALUATED)
+    static_assert(test<bidirectional_iterator<const int*>, bidirectional_iterator<int*> >());
----------------
Same as above, please remove `&& !defined(_LIBCPP_HAS_NO_BUILTIN_IS_CONSTANT_EVALUATED)`


================
Comment at: libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate.pass.cpp:440
 
+#if TEST_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_BUILTIN_IS_CONSTANT_EVALUATED)
+    static_assert(test<forward_iterator<int*> >());
----------------
Same as above for `&& !defined(_LIBCPP_HAS_NO_BUILTIN_IS_CONSTANT_EVALUATED)`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65721



More information about the libcxx-commits mailing list