Revert "[libc] Use best-fit binary trie to make malloc logarithmic" (#117065)
[llvm-project.git] / libcxx / test / std / time / time.clock / time.clock.steady / consistency.pass.cpp
blobfa0ff4f50db836575666a5b3d674e7f76b36de98
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: no-monotonic-clock
11 // Due to C++17 inline variables ASAN flags this test as containing an ODR
12 // violation because Clock::is_steady is defined in both the dylib and this TU.
13 // UNSUPPORTED: asan
15 // <chrono>
17 // steady_clock
19 // check clock invariants
21 #include <chrono>
22 #include <type_traits>
24 #include "test_macros.h"
26 template <class T>
27 void test(const T &) {}
29 int main(int, char**)
31 typedef std::chrono::steady_clock C;
32 static_assert((std::is_same<C::rep, C::duration::rep>::value), "");
33 static_assert((std::is_same<C::period, C::duration::period>::value), "");
34 static_assert((std::is_same<C::duration, C::time_point::duration>::value), "");
35 static_assert(C::is_steady, "");
36 test(std::chrono::steady_clock::is_steady);
38 return 0;