]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use std::to_string() instead of boost lexical_cast.
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 21 Jan 2020 18:12:56 +0000 (11:12 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 23 Jan 2020 00:06:24 +0000 (17:06 -0700)
source/base/utilities.cc

index af0f9120c6939bd7285b211c8af5341627e2dabc..263993fba75e1250d9cf5cc3e9187cf662ad4918 100644 (file)
@@ -29,7 +29,6 @@
 #include <deal.II/base/utilities.h>
 
 #include <boost/iostreams/copy.hpp>
-#include <boost/lexical_cast.hpp>
 #include <boost/random.hpp>
 
 #include <algorithm>
@@ -45,6 +44,7 @@
 #include <iostream>
 #include <limits>
 #include <sstream>
+#include <string>
 
 #if defined(DEAL_II_HAVE_UNISTD_H) && defined(DEAL_II_HAVE_GETHOSTNAME)
 #  include <unistd.h>
@@ -437,7 +437,7 @@ namespace Utilities
   std::string
   to_string(const number value, const unsigned int digits)
   {
-    std::string lc_string = boost::lexical_cast<std::string>(value);
+    std::string lc_string = std::to_string(value);
 
     if (digits == numbers::invalid_unsigned_int)
       return lc_string;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.