Revert "[libc] Use best-fit binary trie to make malloc logarithmic" (#117065)
[llvm-project.git] / libcxx / test / std / time / time.traits / time.traits.is_fp / treat_as_floating_point.pass.cpp
blob9db3d96d26d60446cc90f2bd75da8b7f67c230f5
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 // treat_as_floating_point
13 #include <chrono>
14 #include <type_traits>
16 #include "test_macros.h"
18 template <class T>
19 void
20 test()
22 static_assert((std::is_base_of<std::is_floating_point<T>,
23 std::chrono::treat_as_floating_point<T> >::value), "");
24 #if TEST_STD_VER > 14
25 static_assert(std::is_floating_point<T>::value ==
26 std::chrono::treat_as_floating_point_v<T>, "");
27 #endif
30 struct A {};
32 int main(int, char**)
34 test<int>();
35 test<unsigned>();
36 test<char>();
37 test<bool>();
38 test<float>();
39 test<double>();
40 test<long double>();
41 test<A>();
43 return 0;