operator> <array>

보다 큰 배열 비교 합니다.

template<Ty, std::size_t N>
    bool operator>(
        const array<Ty, N>& left,
        const array<Ty, N>& right);

매개 변수

  • Ty
    요소의 형식입니다.

  • N
    배열의 크기입니다.

  • left
    비교할 왼쪽된 컨테이너입니다.

  • right
    비교할 오른쪽 컨테이너입니다.

설명

템플릿 함수가 반환 right < left.

예제

 

// std_tr1__array__operator_gt.cpp 
// compile with: /EHsc 
#include <array> 
#include <iostream> 
 
typedef std::array<int, 4> Myarray; 
int main() 
    { 
    Myarray c0 = {0, 1, 2, 3}; 
 
// display contents " 0 1 2 3" 
    for (Myarray::const_iterator it = c0.begin(); 
        it != c0.end(); ++it) 
        std::cout << " " << *it; 
    std::cout << std::endl; 
 
    Myarray c1 = {4, 5, 6, 7}; 
 
// display contents " 4 5 6 7" 
    for (Myarray::const_iterator it = c1.begin(); 
        it != c1.end(); ++it) 
        std::cout << " " << *it; 
    std::cout << std::endl; 
 
// display results of comparisons 
    std::cout << std::boolalpha << " " << (c0 > c0); 
    std::cout << std::endl; 
    std::cout << std::boolalpha << " " << (c1 > c0); 
    std::cout << std::endl; 
 
    return (0); 
    } 
 
  

요구 사항

헤더: <array>

네임 스페이스: std

참고 항목

참조

<array>

operator== <array>

operator!= <array>

operator>= <array>

operator< <array>

operator<= <array>