| 31 | |
| 32 | template <typename T> |
| 33 | m2::RectD GetLimitRect(T && t) |
| 34 | { |
| 35 | using Type = RemoveCvrefT<T>; |
| 36 | if constexpr (std::is_same_v<Type, FeatureBuilder>) |
| 37 | return t.GetLimitRect(); |
| 38 | if constexpr (std::is_same_v<Type, std::vector<m2::PointD>>) |
| 39 | { |
| 40 | m2::RectD r; |
| 41 | for (auto const & p : t) |
| 42 | r.Add(p); |
| 43 | return r; |
| 44 | } |
| 45 | if constexpr (std::is_same_v<Type, m2::PointD>) |
| 46 | return m2::RectD(t, t); |
| 47 | |
| 48 | UNREACHABLE(); |
| 49 | } |
| 50 | |
| 51 | template <typename T, typename F> |
| 52 | bool ForAnyPoint(T && t, F && f) |
no test coverage detected