OSDN Git Service

Add file used in boost/cstdint.hpp
authorsdottaka <none@none>
Mon, 9 Sep 2013 15:13:32 +0000 (00:13 +0900)
committersdottaka <none@none>
Mon, 9 Sep 2013 15:13:32 +0000 (00:13 +0900)
Externals/boost/boost/limits.hpp [new file with mode: 0644]

diff --git a/Externals/boost/boost/limits.hpp b/Externals/boost/boost/limits.hpp
new file mode 100644 (file)
index 0000000..37f7217
--- /dev/null
@@ -0,0 +1,146 @@
+\r
+//  (C) Copyright John maddock 1999. \r
+//  (C) David Abrahams 2002.  Distributed under the Boost\r
+//  Software License, Version 1.0. (See accompanying file\r
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+// use this header as a workaround for missing <limits>\r
+\r
+//  See http://www.boost.org/libs/compatibility/index.html for documentation.\r
+\r
+#ifndef BOOST_LIMITS\r
+#define BOOST_LIMITS\r
+\r
+#include <boost/config.hpp>\r
+\r
+#ifdef BOOST_NO_LIMITS\r
+# include <boost/detail/limits.hpp>\r
+#else\r
+# include <limits>\r
+#endif\r
+\r
+#if (defined(BOOST_HAS_LONG_LONG) && defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS)) \\r
+      || (defined(BOOST_HAS_MS_INT64) && defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS))\r
+// Add missing specializations for numeric_limits:\r
+#ifdef BOOST_HAS_MS_INT64\r
+#  define BOOST_LLT __int64\r
+#  define BOOST_ULLT unsigned __int64\r
+#else\r
+#  define BOOST_LLT  ::boost::long_long_type\r
+#  define BOOST_ULLT  ::boost::ulong_long_type\r
+#endif\r
+\r
+#include <climits>  // for CHAR_BIT\r
+\r
+namespace std\r
+{\r
+  template<>\r
+  class numeric_limits<BOOST_LLT> \r
+  {\r
+   public:\r
+\r
+      BOOST_STATIC_CONSTANT(bool, is_specialized = true);\r
+#ifdef BOOST_HAS_MS_INT64\r
+      static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0x8000000000000000i64; }\r
+      static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0x7FFFFFFFFFFFFFFFi64; }\r
+#elif defined(LLONG_MAX)\r
+      static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LLONG_MIN; }\r
+      static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LLONG_MAX; }\r
+#elif defined(LONGLONG_MAX)\r
+      static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LONGLONG_MIN; }\r
+      static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LONGLONG_MAX; }\r
+#else\r
+      static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 1LL << (sizeof(BOOST_LLT) * CHAR_BIT - 1); }\r
+      static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ~(min)(); }\r
+#endif\r
+      BOOST_STATIC_CONSTANT(int, digits = sizeof(BOOST_LLT) * CHAR_BIT -1);\r
+      BOOST_STATIC_CONSTANT(int, digits10 = (CHAR_BIT * sizeof (BOOST_LLT) - 1) * 301L / 1000);\r
+      BOOST_STATIC_CONSTANT(bool, is_signed = true);\r
+      BOOST_STATIC_CONSTANT(bool, is_integer = true);\r
+      BOOST_STATIC_CONSTANT(bool, is_exact = true);\r
+      BOOST_STATIC_CONSTANT(int, radix = 2);\r
+      static BOOST_LLT epsilon() throw() { return 0; };\r
+      static BOOST_LLT round_error() throw() { return 0; };\r
+\r
+      BOOST_STATIC_CONSTANT(int, min_exponent = 0);\r
+      BOOST_STATIC_CONSTANT(int, min_exponent10 = 0);\r
+      BOOST_STATIC_CONSTANT(int, max_exponent = 0);\r
+      BOOST_STATIC_CONSTANT(int, max_exponent10 = 0);\r
+\r
+      BOOST_STATIC_CONSTANT(bool, has_infinity = false);\r
+      BOOST_STATIC_CONSTANT(bool, has_quiet_NaN = false);\r
+      BOOST_STATIC_CONSTANT(bool, has_signaling_NaN = false);\r
+      BOOST_STATIC_CONSTANT(bool, has_denorm = false);\r
+      BOOST_STATIC_CONSTANT(bool, has_denorm_loss = false);\r
+      static BOOST_LLT infinity() throw() { return 0; };\r
+      static BOOST_LLT quiet_NaN() throw() { return 0; };\r
+      static BOOST_LLT signaling_NaN() throw() { return 0; };\r
+      static BOOST_LLT denorm_min() throw() { return 0; };\r
+\r
+      BOOST_STATIC_CONSTANT(bool, is_iec559 = false);\r
+      BOOST_STATIC_CONSTANT(bool, is_bounded = true);\r
+      BOOST_STATIC_CONSTANT(bool, is_modulo = true);\r
+\r
+      BOOST_STATIC_CONSTANT(bool, traps = false);\r
+      BOOST_STATIC_CONSTANT(bool, tinyness_before = false);\r
+      BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero);\r
+      \r
+  };\r
+\r
+  template<>\r
+  class numeric_limits<BOOST_ULLT> \r
+  {\r
+   public:\r
+\r
+      BOOST_STATIC_CONSTANT(bool, is_specialized = true);\r
+#ifdef BOOST_HAS_MS_INT64\r
+      static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0ui64; }\r
+      static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0xFFFFFFFFFFFFFFFFui64; }\r
+#elif defined(ULLONG_MAX) && defined(ULLONG_MIN)\r
+      static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULLONG_MIN; }\r
+      static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULLONG_MAX; }\r
+#elif defined(ULONGLONG_MAX) && defined(ULONGLONG_MIN)\r
+      static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULONGLONG_MIN; }\r
+      static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULONGLONG_MAX; }\r
+#else\r
+      static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0uLL; }\r
+      static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ~0uLL; }\r
+#endif\r
+      BOOST_STATIC_CONSTANT(int, digits = sizeof(BOOST_LLT) * CHAR_BIT);\r
+      BOOST_STATIC_CONSTANT(int, digits10 = (CHAR_BIT * sizeof (BOOST_LLT)) * 301L / 1000);\r
+      BOOST_STATIC_CONSTANT(bool, is_signed = false);\r
+      BOOST_STATIC_CONSTANT(bool, is_integer = true);\r
+      BOOST_STATIC_CONSTANT(bool, is_exact = true);\r
+      BOOST_STATIC_CONSTANT(int, radix = 2);\r
+      static BOOST_ULLT epsilon() throw() { return 0; };\r
+      static BOOST_ULLT round_error() throw() { return 0; };\r
+\r
+      BOOST_STATIC_CONSTANT(int, min_exponent = 0);\r
+      BOOST_STATIC_CONSTANT(int, min_exponent10 = 0);\r
+      BOOST_STATIC_CONSTANT(int, max_exponent = 0);\r
+      BOOST_STATIC_CONSTANT(int, max_exponent10 = 0);\r
+\r
+      BOOST_STATIC_CONSTANT(bool, has_infinity = false);\r
+      BOOST_STATIC_CONSTANT(bool, has_quiet_NaN = false);\r
+      BOOST_STATIC_CONSTANT(bool, has_signaling_NaN = false);\r
+      BOOST_STATIC_CONSTANT(bool, has_denorm = false);\r
+      BOOST_STATIC_CONSTANT(bool, has_denorm_loss = false);\r
+      static BOOST_ULLT infinity() throw() { return 0; };\r
+      static BOOST_ULLT quiet_NaN() throw() { return 0; };\r
+      static BOOST_ULLT signaling_NaN() throw() { return 0; };\r
+      static BOOST_ULLT denorm_min() throw() { return 0; };\r
+\r
+      BOOST_STATIC_CONSTANT(bool, is_iec559 = false);\r
+      BOOST_STATIC_CONSTANT(bool, is_bounded = true);\r
+      BOOST_STATIC_CONSTANT(bool, is_modulo = true);\r
+\r
+      BOOST_STATIC_CONSTANT(bool, traps = false);\r
+      BOOST_STATIC_CONSTANT(bool, tinyness_before = false);\r
+      BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero);\r
+      \r
+  };\r
+}\r
+#endif \r
+\r
+#endif\r
+\r