Squashed 'third_party/boostorg/integer/' content from commit 66dbc2c
Change-Id: I7c6c0492e5492b9349522c6e7be10f459adf4249
git-subtree-dir: third_party/boostorg/integer
git-subtree-split: 66dbc2c70aecc47d5a711b5dac6da6237721a644
diff --git a/include/boost/integer/static_min_max.hpp b/include/boost/integer/static_min_max.hpp
new file mode 100644
index 0000000..ee76fd4
--- /dev/null
+++ b/include/boost/integer/static_min_max.hpp
@@ -0,0 +1,51 @@
+// Boost integer/static_min_max.hpp header file ----------------------------//
+
+// (C) Copyright Daryle Walker 2001.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#ifndef BOOST_INTEGER_STATIC_MIN_MAX_HPP
+#define BOOST_INTEGER_STATIC_MIN_MAX_HPP
+
+#include <boost/integer_fwd.hpp> // self include
+
+namespace boost
+{
+
+// Compile-time extrema class declarations ---------------------------------//
+// Get the minimum or maximum of two values, signed or unsigned.
+
+template <static_min_max_signed_type Value1, static_min_max_signed_type Value2>
+struct static_signed_min
+{
+ BOOST_STATIC_CONSTANT(static_min_max_signed_type, value = (Value1 > Value2) ? Value2 : Value1 );
+};
+
+template <static_min_max_signed_type Value1, static_min_max_signed_type Value2>
+struct static_signed_max
+{
+ BOOST_STATIC_CONSTANT(static_min_max_signed_type, value = (Value1 < Value2) ? Value2 : Value1 );
+};
+
+template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2>
+struct static_unsigned_min
+{
+ BOOST_STATIC_CONSTANT(static_min_max_unsigned_type, value
+ = (Value1 > Value2) ? Value2 : Value1 );
+};
+
+template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2>
+struct static_unsigned_max
+{
+ BOOST_STATIC_CONSTANT(static_min_max_unsigned_type, value
+ = (Value1 < Value2) ? Value2 : Value1 );
+};
+
+
+} // namespace boost
+
+
+#endif // BOOST_INTEGER_STATIC_MIN_MAX_HPP