Imported Upstream version 1.49.0
[platform/upstream/boost.git] / 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 #endif
23
24 namespace boost {
25 namespace chrono {
26 namespace detail {
27
28   template <class T, class U>
29   bool lt(T t, U u)
30   {
31     return t < u;
32   }
33
34   template <class T, class U>
35   bool gt(T t, U u)
36   {
37     return t > u;
38   }
39
40 } // namespace detail
41 } // namespace detail
42 } // namespace chrono
43
44 #endif // BOOST_CHRONO_DETAIL_IS_EVENLY_DIVISIBLE_BY_HPP