GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::ranges::drop_while_view::begin(3) C++ Standard Libary std::ranges::drop_while_view::begin(3)

std::ranges::drop_while_view::begin - std::ranges::drop_while_view::begin


constexpr auto begin(); (since C++20)


Returns an iterator to the first element of the view.


Effectively returns ranges::find_if_not(base_, std::cref(pred())), where base_ is
the underlying view. The behavior is undefined if *this does not store a predicate.


In order to provide the amortized constant time complexity required by the range
concept, this function caches the result within the drop_while_view object for use
on subsequent calls.


(none)


Iterator to the first element of the view.

// 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; }
};


std::cout << *view.begin() << '\n';
}


3


end returns an iterator or a sentinel to the end
(C++20) (public member function)

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.