| 113 | // TODO: remove the #else branch when we no longer have partial C++20 support with CRAN. |
| 114 | template <typename Func> |
| 115 | constexpr bool DispatchHasStatic(const DynamicDispatchTargets<Func> auto& targets) { |
| 116 | #if defined(__cpp_lib_ranges) && __cpp_lib_ranges >= 201911L |
| 117 | return std::ranges::any_of(targets, [](const DynamicDispatchTarget<Func>& trgt) { |
| 118 | return DispatchIsStatic(trgt.level); |
| 119 | }); |
| 120 | #else |
| 121 | return std::any_of(targets.begin(), targets.end(), |
| 122 | [](const DynamicDispatchTarget<Func>& trgt) { |
| 123 | return DispatchIsStatic(trgt.level); |
| 124 | }); |
| 125 | #endif |
| 126 | } |
| 127 | |
| 128 | /// Find the best dispatch target given a filter. |
| 129 | template <typename Func, typename Filter> |
nothing calls this directly
no test coverage detected