diff options
Diffstat (limited to 'libcxx/include/__algorithm/partition.h')
-rw-r--r-- | libcxx/include/__algorithm/partition.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/libcxx/include/__algorithm/partition.h b/libcxx/include/__algorithm/partition.h index c859eaca28a3..2614520ccbcf 100644 --- a/libcxx/include/__algorithm/partition.h +++ b/libcxx/include/__algorithm/partition.h @@ -13,15 +13,11 @@ #include <__iterator/iterator_traits.h> #include <__utility/swap.h> #include <utility> // pair -#include <type_traits> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif -_LIBCPP_PUSH_MACROS -#include <__undef_macros> - _LIBCPP_BEGIN_NAMESPACE_STD template <class _Predicate, class _ForwardIterator> @@ -77,12 +73,10 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred) { - return _VSTD::__partition<typename add_lvalue_reference<_Predicate>::type> - (__first, __last, __pred, typename iterator_traits<_ForwardIterator>::iterator_category()); + return _VSTD::__partition<_Predicate&>( + __first, __last, __pred, typename iterator_traits<_ForwardIterator>::iterator_category()); } _LIBCPP_END_NAMESPACE_STD -_LIBCPP_POP_MACROS - #endif // _LIBCPP___ALGORITHM_PARTITION_H |