Fixed PR10574: http://llvm.org/bugs/show_bug.cgi?id=10574
llvm-svn: 137522
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm
index 3e0938f..da9d0fe 100644
--- a/libcxx/include/algorithm
+++ b/libcxx/include/algorithm
@@ -2233,6 +2233,8 @@
return _VSTD::min(__a, __b, __less<_Tp>());
}
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
template<class _Tp, class _Compare>
inline _LIBCPP_INLINE_VISIBILITY
_Tp
@@ -2249,6 +2251,8 @@
return *_VSTD::min_element(__t.begin(), __t.end());
}
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
// max_element
template <class _ForwardIterator, class _Compare>
@@ -2293,6 +2297,8 @@
return _VSTD::max(__a, __b, __less<_Tp>());
}
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
template<class _Tp, class _Compare>
inline _LIBCPP_INLINE_VISIBILITY
_Tp
@@ -2309,6 +2315,8 @@
return *_VSTD::max_element(__t.begin(), __t.end());
}
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
// minmax_element
template <class _ForwardIterator, class _Compare>
@@ -2388,6 +2396,8 @@
return _VSTD::minmax(__a, __b, __less<_Tp>());
}
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
template<class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
pair<_Tp, _Tp>
@@ -2408,6 +2418,8 @@
return pair<_Tp, _Tp>(*__p.first, *__p.second);
}
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
// random_shuffle
// __independent_bits_engine