]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/convert/test/prepare.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / convert / test / prepare.hpp
index 15c4d015365ce298501bc755245ba3c89aebd0d6..0d244bb79cf0e5c6f998a73ecf9ed6efc68bad22 100644 (file)
@@ -1,12 +1,12 @@
 // Boost.Convert test and usage example
-// Copyright (c) 2009-2016 Vladimir Batov.
+// Copyright (c) 2009-2020 Vladimir Batov.
 // Use, modification and distribution are subject to the Boost Software License,
 // Version 1.0. See http://www.boost.org/LICENSE_1_0.txt.
 
 #ifndef BOOST_CONVERT_TEST_PREPARE_HPP
 #define BOOST_CONVERT_TEST_PREPARE_HPP
 
-#include <boost/array.hpp>
+#include <array>
 #include <ctime>
 #include <cstdlib>
 
@@ -17,7 +17,7 @@ namespace { namespace local
     //     Even though INT_MAX(32) = 2147483647, i.e. 10 digits (not to mention long int)
     //     we only test up to 9 digits as Spirit does not handle more than 9.
 
-    typedef boost::array<my_string, 18> strings; //C1
+    typedef std::array<my_string, 18> strings; //C1
     ///////////////////////////////////////////////////////////////////////////
     // Generate a random number string with N digits
     std::string
@@ -28,7 +28,7 @@ namespace { namespace local
         if (negative)                       // Prepend a '-'
             result += '-';
 
-        result += '1' + (std::rand()%9);         // The first digit cannot be '0'
+        result += '1' + (std::rand() % 9);  // The first digit cannot be '0'
 
         for (int i = 1; i < digits; ++i)    // Generate the remaining digits
             result += '0' + (std::rand()%10);
@@ -38,9 +38,9 @@ namespace { namespace local
     local::strings const&
     get_strs()
     {
-        static local::strings strings;
-        static bool            filled;
-        static bool          negative = true;
+        static auto  strings = local::strings();
+        static bool   filled = false;
+        static bool negative = true;
 
         if (!filled)
         {