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

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 20 14:53:40 PDT 2020


ldionne requested changes to this revision.
ldionne added inline comments.
This revision now requires changes to proceed.


================
Comment at: libcxx/include/algorithm:1873
 template <class _Tp, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
 typename enable_if
----------------
Wait, this doesn't work at all because `memmove` isn't `constexpr`. You still need the `_constexpr` functions, I just meant that it was reasonable to not try to use their `constexpr` version when `is_constant_evaluated()` isn't supported by the compiler.

I would expect that your tests fail with the patch as it is (and if not there's something I don't understand, so please LMK).


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