From 1868e9348cedea33e1a8a02691ce3c3805c479bb Mon Sep 17 00:00:00 2001 From: Mikhail Dvorskiy Date: Thu, 21 Mar 2024 12:21:03 +0100 Subject: [PATCH] [oneDPL][ranges] revert unnecessary changes in iterator_defs.h --- include/oneapi/dpl/pstl/iterator_defs.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/include/oneapi/dpl/pstl/iterator_defs.h b/include/oneapi/dpl/pstl/iterator_defs.h index c445a42636a..1b85d74fc40 100644 --- a/include/oneapi/dpl/pstl/iterator_defs.h +++ b/include/oneapi/dpl/pstl/iterator_defs.h @@ -31,18 +31,23 @@ namespace __internal // SFINAE with a non-iterator type by providing a default value. template auto -__is_iterator_of(int) -> typename ::std::conjunction<::std::is_base_of< - _IteratorTag, typename ::std::iterator_traits<::std::decay_t<_IteratorTypes>>::iterator_category>...>::type; +__is_iterator_of(int) -> decltype( + ::std::conjunction<::std::is_base_of< + _IteratorTag, typename ::std::iterator_traits<::std::decay_t<_IteratorTypes>>::iterator_category>...>{}); template auto __is_iterator_of(...) -> ::std::false_type; template -using __is_random_access_iterator = decltype(__is_iterator_of<::std::random_access_iterator_tag, _IteratorTypes...>(0)); +struct __is_random_access_iterator : decltype(__is_iterator_of<::std::random_access_iterator_tag, _IteratorTypes...>(0)) +{ +}; template -using __is_forward_iterator = decltype(__is_iterator_of<::std::forward_iterator_tag, _IteratorTypes...>(0)); +struct __is_forward_iterator : decltype(__is_iterator_of<::std::forward_iterator_tag, _IteratorTypes...>(0)) +{ +}; template inline constexpr bool __is_random_access_iterator_v = __is_random_access_iterator<_IteratorTypes...>::value;