| 1962 | template <typename T, |
| 1963 | typename ContainerOut = std::vector<T>> |
| 1964 | ContainerOut numbers_step(const T start, const T end, const T step) |
| 1965 | { |
| 1966 | ContainerOut result; |
| 1967 | if ((step > 0 && start >= end) || (step < 0 && start <= end) || step == 0) { |
| 1968 | return result; |
| 1969 | } |
| 1970 | std::size_t size = static_cast<std::size_t>((end - start) / step); |
| 1971 | internal::prepare_container(result, size); |
| 1972 | auto it = internal::get_back_inserter(result); |
| 1973 | for (T x = start; x < end; x += step) |
| 1974 | *it = x; |
| 1975 | return result; |
| 1976 | } |
| 1977 | |
| 1978 | // API search type: numbers : (a, a) -> [a] |
| 1979 | // fwd bind count: 1 |
no test coverage detected