@@ -104,13 +104,11 @@ namespace experimental::execution
104104 return std::make_pair (static_cast <Shape>(begin), static_cast <Shape>(end));
105105 }
106106
107- #if !STDEXEC_NO_STDCPP_RANGES()
108107 namespace schedule_all_
109108 {
110109 template <class Range >
111110 class sequence ;
112111 } // namespace schedule_all_
113- #endif
114112
115113 struct task_base
116114 {
@@ -267,7 +265,6 @@ namespace experimental::execution
267265 _static_thread_pool& pool_;
268266 };
269267
270- #if !STDEXEC_NO_STDCPP_RANGES()
271268 struct _transform_iterate
272269 {
273270 template <class Range >
@@ -278,7 +275,6 @@ namespace experimental::execution
278275
279276 _static_thread_pool& pool_;
280277 };
281- #endif
282278
283279 static auto _hardware_concurrency () noexcept -> unsigned int
284280 {
@@ -316,7 +312,6 @@ namespace experimental::execution
316312 }
317313 }
318314
319- #if !STDEXEC_NO_STDCPP_RANGES()
320315 template <sender_for<exec::iterate_t > Sender, class Env >
321316 constexpr auto
322317 transform_sender (STDEXEC::set_value_t , Sender&& sndr, Env const & env) const noexcept
@@ -340,7 +335,6 @@ namespace experimental::execution
340335 STDEXEC::_WITH_ENVIRONMENT_ (Env)>();
341336 }
342337 }
343- #endif
344338 };
345339
346340 public:
@@ -765,8 +759,7 @@ namespace experimental::execution
765759 .thread_index = index});
766760 }
767761
768- // NOLINTNEXTLINE(modernize-use-ranges) we still support platforms without the std::ranges algorithms
769- std::sort (thread_index_by_numa_node_.begin (), thread_index_by_numa_node_.end ());
762+ std::ranges::sort (thread_index_by_numa_node_);
770763 std::vector<workstealing_victim> victims{};
771764 for (auto & state: thread_states_)
772765 {
@@ -842,15 +835,12 @@ namespace experimental::execution
842835 inline auto _static_thread_pool::num_threads (int numa) const noexcept -> std::size_t
843836 {
844837 thread_index_by_numa_node key{.numa_node = numa, .thread_index = 0 };
845- // NOLINTNEXTLINE(modernize-use-ranges) we still support platforms without the std::ranges algorithms
846- auto it = std::lower_bound (thread_index_by_numa_node_.begin (),
847- thread_index_by_numa_node_.end (),
848- key);
838+ auto it = std::ranges::lower_bound (thread_index_by_numa_node_, key);
849839 if (it == thread_index_by_numa_node_.end ())
850840 {
851841 return 0 ;
852842 }
853- auto it_end = std::upper_bound (it, thread_index_by_numa_node_.end (), key);
843+ auto it_end = std::ranges:: upper_bound (it, thread_index_by_numa_node_.end (), key);
854844 return static_cast <std::size_t >(std::distance (it, it_end));
855845 }
856846
@@ -876,10 +866,7 @@ namespace experimental::execution
876866 -> std::size_t
877867 {
878868 thread_index_by_numa_node key{.numa_node = node_index, .thread_index = 0 };
879- // NOLINTNEXTLINE(modernize-use-ranges) we still support platforms without the std::ranges algorithms
880- auto it = std::lower_bound (thread_index_by_numa_node_.begin (),
881- thread_index_by_numa_node_.end (),
882- key);
869+ auto it = std::ranges::lower_bound (thread_index_by_numa_node_, key);
883870 STDEXEC_ASSERT (it != thread_index_by_numa_node_.end ());
884871 std::advance (it, thread_index);
885872 return it->thread_index ;
@@ -1578,7 +1565,6 @@ namespace experimental::execution
15781565 {}
15791566 };
15801567
1581- #if !STDEXEC_NO_STDCPP_RANGES()
15821568 namespace schedule_all_
15831569 {
15841570 template <class Rcvr >
@@ -1832,14 +1818,11 @@ namespace experimental::execution
18321818 } // namespace schedule_all_
18331819
18341820 struct schedule_all_t ;
1835- #endif
18361821 } // namespace _pool_
18371822
18381823 struct static_thread_pool : private _pool_ ::_static_thread_pool
18391824 {
1840- #if !STDEXEC_NO_STDCPP_RANGES()
18411825 friend struct _pool_ ::schedule_all_t ;
1842- #endif
18431826 using task_base = _pool_::task_base;
18441827
18451828 static_thread_pool () = default ;
@@ -1872,7 +1855,6 @@ namespace experimental::execution
18721855 using _pool_::_static_thread_pool::params;
18731856 };
18741857
1875- #if !STDEXEC_NO_STDCPP_RANGES()
18761858 namespace _pool_
18771859 {
18781860 struct schedule_all_t
@@ -1887,7 +1869,6 @@ namespace experimental::execution
18871869 } // namespace _pool_
18881870
18891871 inline constexpr _pool_::schedule_all_t schedule_all{};
1890- #endif
18911872
18921873} // namespace experimental::execution
18931874
0 commit comments