]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/chrono/include/boost/chrono/detail/no_warning/signed_unsigned_cmp.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / chrono / include / boost / chrono / detail / no_warning / signed_unsigned_cmp.hpp
1 // is_evenly_divisible_by.hpp --------------------------------------------------------------//
2
3 // Copyright 2009-2010 Vicente J. Botet Escriba
4
5 // Distributed under the Boost Software License, Version 1.0.
6 // See http://www.boost.org/LICENSE_1_0.txt
7
8 #ifndef BOOST_CHRONO_DETAIL_NO_WARNING_SIGNED_UNSIGNED_CMP_HPP
9 #define BOOST_CHRONO_DETAIL_NO_WARNING_SIGNED_UNSIGNED_CMP_HPP
10
11 //
12 // We simply cannot include this header on gcc without getting copious warnings of the kind:
13 //
14 //../../../boost/chrono/detail/no_warning/signed_unsigned_cmp.hpp:37: warning: comparison between signed and unsigned integer expressions
15 //
16 // And yet there is no other reasonable implementation, so we declare this a system header
17 // to suppress these warnings.
18 //
19
20 #if defined(__GNUC__) && (__GNUC__ >= 4)
21 #pragma GCC system_header
22 #elif defined __SUNPRO_CC
23 #pragma disable_warn
24 #elif defined _MSC_VER
25 #pragma warning(push, 1)
26 #endif
27
28 namespace boost {
29 namespace chrono {
30 namespace detail {
31
32 template <class T, class U>
33 bool lt(T t, U u)
34 {
35 return t < u;
36 }
37
38 template <class T, class U>
39 bool gt(T t, U u)
40 {
41 return t > u;
42 }
43
44 } // namespace detail
45 } // namespace detail
46 } // namespace chrono
47
48 #if defined __SUNPRO_CC
49 #pragma enable_warn
50 #elif defined _MSC_VER
51 #pragma warning(pop)
52 #endif
53
54 #endif // BOOST_CHRONO_DETAIL_NO_WARNING_SIGNED_UNSIGNED_CMP_HPP