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

Marshall Clow via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 6 10:01:30 PDT 2019


mclow.lists added inline comments.


================
Comment at: libcxx/include/algorithm:2308
 template <class _ForwardIterator>
-_ForwardIterator
+_LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
 __rotate_left(_ForwardIterator __first, _ForwardIterator __last)
----------------
zoecarver wrote:
> ldionne wrote:
> > This function can be made constexpr in all standard modes that support generalized constexpr (so C++14 and above).
> > 
> > That holds for all helper functions below.
> Was `std::rotate` updated as a paper or an issue? Or have we decided to extend constexpr support back to C++14 independent of the standard? 
We don't have the freedom to add `constexpr` to things in the standard.
We do have the freedom to add `noexcept`.

Odd, but that's the world we've got.


Repository:
  rCXX libc++

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

https://reviews.llvm.org/D65721





More information about the libcxx-commits mailing list