New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
static_min_max.hpp in vendors/XIOS/current/extern/boost/include/boost/integer – NEMO

source: vendors/XIOS/current/extern/boost/include/boost/integer/static_min_max.hpp @ 3428

Last change on this file since 3428 was 3428, checked in by rblod, 12 years ago

importing initial XIOS vendor drop

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