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
21template <class T>
22void
23test()
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
29struct A {};
30
31void 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

source code of boost/libs/chrono/test/traits/treat_as_floating_point_pass.cpp