]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/ratio/test/ratio_extensions/mpl_abs_pass.cpp
1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
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
16 #define BOOST_RATIO_EXTENSIONS
18 #include <boost/ratio/mpl/abs.hpp>
19 #if !defined(BOOST_NO_CXX11_STATIC_ASSERT)
27 typedef boost::ratio
<0> R1
;
28 typedef boost::mpl::abs
<R1
> R
;
29 BOOST_RATIO_STATIC_ASSERT(R::num
== 0 && R::den
== 1, NOTHING
, ());
32 typedef boost::ratio
<1, 1> R1
;
33 typedef boost::mpl::abs
<R1
> R
;
34 BOOST_RATIO_STATIC_ASSERT(R::num
== 1 && R::den
== 1, NOTHING
, ());
37 typedef boost::ratio
<1, 2> R1
;
38 typedef boost::mpl::abs
<R1
> R
;
39 BOOST_RATIO_STATIC_ASSERT(R::num
== 1 && R::den
== 2, NOTHING
, ());
42 typedef boost::ratio
<-1, 2> R1
;
43 typedef boost::mpl::abs
<R1
> R
;
44 BOOST_RATIO_STATIC_ASSERT(R::num
== 1 && R::den
== 2, NOTHING
, ());
47 typedef boost::ratio
<1, -2> R1
;
48 typedef boost::mpl::abs
<R1
> R
;
49 BOOST_RATIO_STATIC_ASSERT(R::num
== 1 && R::den
== 2, NOTHING
, ());