Revert "[libc] Use best-fit binary trie to make malloc logarithmic" (#117065)
[llvm-project.git] / libcxx / test / std / time / time.point / time.point.comparisons / op_equal.compile.fail.cpp
blob2b5795026b34ac2717dc99166ef270e1a6f81a38
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 //===----------------------------------------------------------------------===//
9 // <chrono>
11 // time_point
13 // template <class Clock, class Duration1, class Duration2>
14 // bool
15 // operator==(const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs);
17 // template <class Clock, class Duration1, class Duration2>
18 // bool
19 // operator!=(const time_point<Clock, Duration1>& lhs, const time_point<Clock, Duration2>& rhs);
21 // time_points with different clocks should not compare
23 #include <chrono>
25 #include "../../clock.h"
27 int main(int, char**)
29 typedef std::chrono::system_clock Clock1;
30 typedef Clock Clock2;
31 typedef std::chrono::milliseconds Duration1;
32 typedef std::chrono::microseconds Duration2;
33 typedef std::chrono::time_point<Clock1, Duration1> T1;
34 typedef std::chrono::time_point<Clock2, Duration2> T2;
36 T1 t1(Duration1(3));
37 T2 t2(Duration2(3000));
38 t1 == t2;
40 return 0;