• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //  Adaptation to Boost of the libcxx
10 //  Copyright 2010 Vicente J. Botet Escriba
11 //  Distributed under the Boost Software License, Version 1.0.
12 //  See http://www.boost.org/LICENSE_1_0.txt
13 
14 #include <boost/chrono/chrono.hpp>
15 #include <boost/type_traits.hpp>
16 
17 #if !defined(BOOST_NO_CXX11_STATIC_ASSERT)
18 #define NOTHING ""
19 #endif
20 
21 template <class T>
22 void
test()23 test()
24 {
25     BOOST_CHRONO_STATIC_ASSERT((boost::is_base_of<boost::is_floating_point<T>,
26                                    boost::chrono::treat_as_floating_point<T> >::value), NOTHING, ());
27 }
28 
29 struct A {};
30 
testall()31 void testall()
32 {
33     test<int>();
34     test<unsigned>();
35     test<char>();
36     test<bool>();
37     test<float>();
38     test<double>();
39     test<long double>();
40     test<A>();
41 }
42