[libcxx] r303856 - Make for_each_n only avaliable on C++17

Marshall Clow via cfe-commits cfe-commits at lists.llvm.org
Thu May 25 06:40:57 PDT 2017


Author: marshall
Date: Thu May 25 08:40:57 2017
New Revision: 303856

URL: http://llvm.org/viewvc/llvm-project?rev=303856&view=rev
Log:
Make for_each_n only avaliable on C++17

Modified:
    libcxx/trunk/include/algorithm

Modified: libcxx/trunk/include/algorithm
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/algorithm?rev=303856&r1=303855&r2=303856&view=diff
==============================================================================
--- libcxx/trunk/include/algorithm (original)
+++ libcxx/trunk/include/algorithm Thu May 25 08:40:57 2017
@@ -964,6 +964,7 @@ for_each(_InputIterator __first, _InputI
     return __f;
 }
 
+#if _LIBCPP_STD_VER > 14
 // for_each_n
 
 template <class _InputIterator, class _Size, class _Function>
@@ -981,6 +982,7 @@ for_each_n(_InputIterator __first, _Size
     }
     return __first;
 }
+#endif
 
 // find
 
@@ -1758,7 +1760,7 @@ __unwrap_iter(_Iter __i)
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
 typename enable_if
 <
     is_trivially_copy_assignable<_Tp>::value,
@@ -1772,7 +1774,7 @@ __unwrap_iter(move_iterator<_Tp*> __i)
 #if _LIBCPP_DEBUG_LEVEL < 2
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
 typename enable_if
 <
     is_trivially_copy_assignable<_Tp>::value,
@@ -1786,7 +1788,7 @@ __unwrap_iter(__wrap_iter<_Tp*> __i)
 #else
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
 typename enable_if
 <
     is_trivially_copy_assignable<_Tp>::value,




More information about the cfe-commits mailing list