std::ranges::drop_while_view<V,Pred>::end
De cppreference.com
<tbody>
</tbody>
constexpr auto end(); |
(desde C++20) | |
Devuelve un centinela o un iterador que representa el final de la vista drop_while_view.
Efectivamente devuelve ranges::end(base_), donde base_ es la vista subyacente.
Parámetros
(Ninguno)
Valor de retorno
Un centinela o un iterador que representa el final de la vista.
Ejemplo
Ejecuta este código
#include <array>
#include <iostream>
#include <ranges>
int main()
{
constexpr std::array datos{ 0, -1, -2, 3, 1, 4, 1, 5 };
auto vista = std::ranges::drop_while_view{
datos, [](int x) { return x <= 0; }
};
for (auto it = vista.begin(); it != vista.end(); ++it) {
std::cout << *it << ' ';
}
std::cout << '\n';
}
Salida:
3 1 4 1 5
Véase también
(C++20) |
Devuelve un iterador al comienzo. (función miembro pública) |