Debian Codegraph @

libstdc++-v3/testsuite/20_util/pair/comparison_operators/lwg3865.cc

raw
1 // { dg-do run { target c++20 } }
2
3 // LWG 3865. Sorting a range of pairs
4
5 #include <utility>
6 #include <testsuite_hooks.h>
7
8 int main()
9 {
10 std::pair<int, int> p(1, 2);
11 std::pair<int&, int&> p2(p.first, p.second);
12 VERIFY( p == p2 );
13 VERIFY( p <= p2 );
14 VERIFY( p >= p2 );
15 }