Namespaces
Variants

operator- (ranges::adjacent_view:: sentinel )

From cppreference.net
Ranges library
Range adaptors
template < bool OtherConst >

requires std:: sized_sentinel_for < ranges:: sentinel_t < Base > ,
ranges:: iterator_t < /*maybe-const*/ < OtherConst, V >>>
friend constexpr ranges:: range_difference_t < /*maybe-const*/ < OtherConst, V >>

operator - ( const /*iterator*/ < OtherConst > & x, const /*sentinel*/ & y ) ;
(1) (C++23부터)
template < bool OtherConst >

requires std:: sized_sentinel_for < ranges:: sentinel_t < Base > ,
ranges:: iterator_t < /*maybe-const*/ < OtherConst, V >>>
friend constexpr ranges:: range_difference_t < /*maybe-const*/ < OtherConst, V >>

operator - ( const /*sentinel*/ & y, const /*iterator*/ < OtherConst > & x ) ;
(2) (C++23부터)

x 의 기반 반복자와 y 의 기반 센티널 사이의 거리를 계산합니다.

current_ x 의 기본 반복자 배열을 나타내고, end_ y 의 기본 센티널을 나타낸다고 하자.

1) 다음과 동일함: return x. current_ . back ( ) - y. end_ ;
2) 동등한 표현: return y. end_ - x. current_ . back ( ) ;

이러한 함수 템플릿은 일반적인 unqualified lookup 또는 qualified lookup 에는 보이지 않으며, adjacent_view:: sentinel 가 인자들의 연관 클래스일 때에만 argument-dependent lookup 에 의해 발견될 수 있습니다.

목차

매개변수

x - an iterator
y - a sentinel

반환값

x y 사이의 거리.

예제

참고 항목