• 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/detail/lightweight_test.hpp>
16 
17 #if defined BOOST_NO_CXX11_NUMERIC_LIMITS || defined BOOST_NO_CXX11_CONSTEXPR
18 #define BOOST_CONSTEXPR_ASSERT(C) BOOST_TEST(C)
19 #else
20 #include <boost/static_assert.hpp>
21 #define BOOST_CONSTEXPR_ASSERT(C) BOOST_STATIC_ASSERT(C)
22 #endif
23 
main()24 int main()
25 {
26     typedef boost::chrono::system_clock Clock;
27     typedef boost::chrono::milliseconds Duration;
28     typedef boost::chrono::time_point<Clock, Duration> TP;
29 
30     BOOST_CONSTEXPR_ASSERT((TP::min)() == TP((Duration::min)()));
31     BOOST_CONSTEXPR_ASSERT((TP::max)() == TP((Duration::max)()));
32 
33     return boost::report_errors();
34 }
35