]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/qvm/to_string.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / qvm / to_string.hpp
index b3bef3f5d2da4dfe9002bba5e08e927c676ce942..37442d98d73b075501b2e795055125c8bf611a62 100644 (file)
@@ -1,31 +1,51 @@
-//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
+#ifndef BOOST_QVM_TO_STRING_HPP_INCLUDED
+#define BOOST_QVM_TO_STRING_HPP_INCLUDED
 
-//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)
+// Copyright 2008-2022 Emil Dotchevski and Reverge Studios, Inc.
 
-#ifndef BOOST_QVM_2812944066B011E29F616DCB6188709B
-#define BOOST_QVM_2812944066B011E29F616DCB6188709B
+// 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)
 
-#include <boost/exception/to_string.hpp>
+#if __cplusplus >= 201103L
+
+#include <string>
+
+namespace boost { namespace qvm {
 
 namespace
-boost
+qvm_to_string_detail
     {
-    namespace
-    qvm
+    template <class T>
+    std::string
+    to_string( T const & x )
         {
-        namespace
-        qvm_to_string_detail
-            {
-            template <class T>
-            std::string
-            to_string( T const & x )
-                {
-                using boost::to_string;
-                return to_string(x);
-                }
-            }
+        return std::to_string(x);
         }
     }
 
+} }
+
+#else
+
+#include <sstream>
+
+namespace boost { namespace qvm {
+
+namespace
+qvm_to_string_detail
+    {
+    template <class T>
+    std::string
+    to_string( T const & x )
+        {
+        std::stringstream s;
+        s << x;
+        return s.str();
+        }
+    }
+
+} }
+
+#endif
+
 #endif