1 | //===----------------------------------------------------------------------===// |
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | // UNSUPPORTED: c++03, c++11, c++14, c++17 |
10 | |
11 | // <chrono> |
12 | |
13 | // time_point |
14 | |
15 | // template<class Clock, class Duration1, |
16 | // three_way_comparable_with<Duration1> Duration2> |
17 | // constexpr auto operator<=>(const time_point<Clock, Duration1>& lhs, |
18 | // const time_point<Clock, Duration2>& rhs); |
19 | |
20 | // time_points with different clocks should not compare |
21 | |
22 | #include <chrono> |
23 | |
24 | #include "../../clock.h" |
25 | |
26 | int main(int, char**) { |
27 | using namespace std::chrono_literals; |
28 | std::chrono::time_point<std::chrono::system_clock, std::chrono::milliseconds> t1{3ms}; |
29 | std::chrono::time_point<Clock, std::chrono::milliseconds> t2{3ms}; |
30 | |
31 | t1 <=> t2; |
32 | |
33 | return 0; |
34 | } |
35 | |