diff --git a/include/oneapi/tbb/detail/_range_common.h b/include/oneapi/tbb/detail/_range_common.h index 1011f029df..ac219587d7 100644 --- a/include/oneapi/tbb/detail/_range_common.h +++ b/include/oneapi/tbb/detail/_range_common.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2005-2021 Intel Corporation + Copyright (c) 2005-2025 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -102,20 +102,23 @@ concept tbb_range = std::copy_constructible && { range.is_divisible() } -> relaxed_convertible_to; }; +template +struct iterator_concept_helper; + +// New specializations should be added in case of using container_based_sequence with +// the new iterator tag types template -constexpr bool iterator_concept_helper( std::input_iterator_tag ) { - return std::input_iterator; -} +struct iterator_concept_helper { + static constexpr bool value = std::input_iterator; +}; template -constexpr bool iterator_concept_helper( std::random_access_iterator_tag ) { - return std::random_access_iterator; -} +struct iterator_concept_helper { + static constexpr bool value = std::random_access_iterator; +}; template -concept iterator_satisfies = requires (IteratorTag tag) { - requires iterator_concept_helper(tag); -}; +concept iterator_satisfies = iterator_concept_helper::value; template concept container_based_sequence = requires( Sequence& seq ) {