Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
std::ranges...le_view::end(3) C++ Standard Libarystd::ranges...le_view::end(3)

NAME
       std::ranges::drop_while_view::end - std::ranges::drop_while_view::end

Synopsis
	  constexpr auto end();	 (since	C++20)

	  Returns  a  sentinel	or  an	iterator  representing	the end	of the
       drop_while_view.

	  Effectively returns ranges::end(base_), where	base_ is the  underly-
       ing view.

Parameters
	  (none)

Return value
	  a sentinel or	an iterator representing the end of the	view

Example
       // Run this code

	#include <array>
	#include <iostream>
	#include <ranges>

	int main()
	{
	    constexpr std::array data{ 0, -1, -2, 3, 1,	4, 1, 5	};

	    auto view =	std::ranges::drop_while_view{
		data, [](int x)	{ return x <= 0; }
	    };

	    for	(auto it = view.begin(); it != view.end(); ++it) {
		std::cout << *it << ' ';
	    }
	    std::cout << '\n';
	}

Output:
	3 1 4 1	5

See also
	  begin	  returns an iterator to the beginning
	  (C++20) (public member function)

http://cppreference.com		  2022.07.31	 std::ranges...le_view::end(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=std::ranges::drop_while_view::end&sektion=3&manpath=FreeBSD+Ports+15.0>

home | help