| 96 | // TODO: remove the #else branch when we no longer have partial C++20 support with CRAN. |
| 97 | template <typename Func> |
| 98 | constexpr bool DispatchFullyStatic(const DynamicDispatchTargets<Func> auto& targets) { |
| 99 | #if defined(__cpp_lib_ranges) && __cpp_lib_ranges >= 201911L |
| 100 | return std::ranges::all_of(targets, [](const DynamicDispatchTarget<Func>& trgt) { |
| 101 | return DispatchIsStatic(trgt.level); |
| 102 | }); |
| 103 | #else |
| 104 | return std::all_of(targets.begin(), targets.end(), |
| 105 | [](const DynamicDispatchTarget<Func>& trgt) { |
| 106 | return DispatchIsStatic(trgt.level); |
| 107 | }); |
| 108 | #endif |
| 109 | } |
| 110 | |
| 111 | /// Return whether any function in the array can be statically dispatched. |
| 112 | /// Return false on empty sets. |
nothing calls this directly
no test coverage detected