]> AND Private Git Repository - canny.git/blob - stc/exp/ml_stc_linux_make_v1.0/include/boost/integer/static_min_max.hpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
036aa8e47e8913f61b2b3ce3904abbaded60da92
[canny.git] / stc / exp / ml_stc_linux_make_v1.0 / include / boost / integer / static_min_max.hpp
1 //  Boost integer/static_min_max.hpp header file  ----------------------------//\r
2 \r
3 //  (C) Copyright Daryle Walker 2001.\r
4 //  Distributed under the Boost Software License, Version 1.0. (See\r
5 //  accompanying file LICENSE_1_0.txt or copy at\r
6 //  http://www.boost.org/LICENSE_1_0.txt)\r
7 \r
8 //  See http://www.boost.org for updates, documentation, and revision history. \r
9 \r
10 #ifndef BOOST_INTEGER_STATIC_MIN_MAX_HPP\r
11 #define BOOST_INTEGER_STATIC_MIN_MAX_HPP\r
12 \r
13 #include <boost/integer_fwd.hpp>  // self include\r
14 \r
15 namespace boost\r
16 {\r
17 \r
18 //  Compile-time extrema class declarations  ---------------------------------//\r
19 //  Get the minimum or maximum of two values, signed or unsigned.\r
20 \r
21 template <static_min_max_signed_type Value1, static_min_max_signed_type Value2>\r
22 struct static_signed_min\r
23 {\r
24     BOOST_STATIC_CONSTANT(static_min_max_signed_type, value = (Value1 > Value2) ? Value2 : Value1 );\r
25 };\r
26 \r
27 template <static_min_max_signed_type Value1, static_min_max_signed_type Value2>\r
28 struct static_signed_max\r
29 {\r
30     BOOST_STATIC_CONSTANT(static_min_max_signed_type, value = (Value1 < Value2) ? Value2 : Value1 );\r
31 };\r
32 \r
33 template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2>\r
34 struct static_unsigned_min\r
35 {\r
36     BOOST_STATIC_CONSTANT(static_min_max_unsigned_type, value\r
37      = (Value1 > Value2) ? Value2 : Value1 );\r
38 };\r
39 \r
40 template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2>\r
41 struct static_unsigned_max\r
42 {\r
43     BOOST_STATIC_CONSTANT(static_min_max_unsigned_type, value\r
44      = (Value1 < Value2) ? Value2 : Value1 );\r
45 };\r
46 \r
47 \r
48 }  // namespace boost\r
49 \r
50 \r
51 #endif  // BOOST_INTEGER_STATIC_MIN_MAX_HPP\r