]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/graph/numeric_values.hpp
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / boost / boost / graph / numeric_values.hpp
index ad01837270a5b828d28cf4d8c0cb5cdbd4713444..d4d54e01cadbfa9ca69c1930bebe7a599cdfffa2 100644 (file)
 namespace boost
 {
 
-#define BOOST_GRAPH_SPECIALIZE_NUMERIC_FLOAT(type) \
-    template <> struct numeric_values<type> { \
-        typedef type value_type; \
-        static type zero() { return 0.0; } \
-        static type infinity() { return std::numeric_limits<type>::infinity(); } \
+#define BOOST_GRAPH_SPECIALIZE_NUMERIC_FLOAT(type)          \
+    template <> struct numeric_values< type >               \
+    {                                                       \
+        typedef type value_type;                            \
+        static type zero() { return 0.0; }                  \
+        static type infinity()                              \
+        {                                                   \
+            return std::numeric_limits< type >::infinity(); \
+        }                                                   \
     };
 
-    /**
-     * This generic type reports various numeric values for some type. In the
-     * general case, numeric values simply treat their maximum value as infinity
-     * and the default-constructed value as 0.
-     *
-     * Specializations of this template can redefine the notions of zero and
-     * infinity for various types. For example, the class is specialized for
-     * floating point types to use the built in notion of infinity.
-     */
-    template <typename T>
-    struct numeric_values
-    {
-        typedef T value_type;
-
-        static T zero()
-        { return T(); }
-
-        static T infinity()
-        { return (std::numeric_limits<T>::max)(); }
-    };
+/**
+ * This generic type reports various numeric values for some type. In the
+ * general case, numeric values simply treat their maximum value as infinity
+ * and the default-constructed value as 0.
+ *
+ * Specializations of this template can redefine the notions of zero and
+ * infinity for various types. For example, the class is specialized for
+ * floating point types to use the built in notion of infinity.
+ */
+template < typename T > struct numeric_values
+{
+    typedef T value_type;
+
+    static T zero() { return T(); }
+
+    static T infinity() { return (std::numeric_limits< T >::max)(); }
+};
 
-    // Specializations for floating point types refer to 0.0 and their infinity
-    // value defined by numeric_limits.
-    BOOST_GRAPH_SPECIALIZE_NUMERIC_FLOAT(float)
-    BOOST_GRAPH_SPECIALIZE_NUMERIC_FLOAT(double)
-    BOOST_GRAPH_SPECIALIZE_NUMERIC_FLOAT(long double)
+// Specializations for floating point types refer to 0.0 and their infinity
+// value defined by numeric_limits.
+BOOST_GRAPH_SPECIALIZE_NUMERIC_FLOAT(float)
+BOOST_GRAPH_SPECIALIZE_NUMERIC_FLOAT(double)
+BOOST_GRAPH_SPECIALIZE_NUMERIC_FLOAT(long double)
 
 #undef BOOST_GRAPH_SPECIALIZE_NUMERIC_VALUE
 }