Skip to content

Commit

Permalink
[oneDPL][ranges] revert unnecessary changes in iterator_defs.h
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeDvorskiy committed Mar 21, 2024
1 parent f27166e commit 1868e93
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions include/oneapi/dpl/pstl/iterator_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,23 @@ namespace __internal
// SFINAE with a non-iterator type by providing a default value.
template <typename _IteratorTag, typename... _IteratorTypes>
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 <typename... _IteratorTypes>
auto
__is_iterator_of(...) -> ::std::false_type;

template <typename... _IteratorTypes>
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 <typename... _IteratorTypes>
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 <typename... _IteratorTypes>
inline constexpr bool __is_random_access_iterator_v = __is_random_access_iterator<_IteratorTypes...>::value;
Expand Down

0 comments on commit 1868e93

Please sign in to comment.