More P0202 constexpr-ifying in <algorithm>. This commit handles 'transform'.
llvm-svn: 322970
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm
index 4672810..9ec146a 100644
--- a/libcxx/include/algorithm
+++ b/libcxx/include/algorithm
@@ -193,11 +193,11 @@
iter_swap(ForwardIterator1 a, ForwardIterator2 b);
template <class InputIterator, class OutputIterator, class UnaryOperation>
- OutputIterator
+ constexpr OutputIterator // constexpr in C++20
transform(InputIterator first, InputIterator last, OutputIterator result, UnaryOperation op);
template <class InputIterator1, class InputIterator2, class OutputIterator, class BinaryOperation>
- OutputIterator
+ constexpr OutputIterator // constexpr in C++20
transform(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2,
OutputIterator result, BinaryOperation binary_op);
@@ -1946,7 +1946,7 @@
// transform
template <class _InputIterator, class _OutputIterator, class _UnaryOperation>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
_OutputIterator
transform(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _UnaryOperation __op)
{
@@ -1956,7 +1956,7 @@
}
template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _BinaryOperation>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
_OutputIterator
transform(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2,
_OutputIterator __result, _BinaryOperation __binary_op)