util: remove obsolete backport of std::to_string
Change-Id: Ib2ba051b84032b227ce75f41e242af20b4a43c3c
diff --git a/.waf-tools/compiler-features.py b/.waf-tools/compiler-features.py
deleted file mode 100644
index 1602f16..0000000
--- a/.waf-tools/compiler-features.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
-
-from waflib.Configure import conf
-
-STD_TO_STRING = '''
-#include <string>
-int
-main()
-{
- std::string s = std::to_string(0);
- s = std::to_string(0l);
- s = std::to_string(0ll);
- s = std::to_string(0u);
- s = std::to_string(0ul);
- s = std::to_string(0ull);
- s = std::to_string(0.0f);
- s = std::to_string(0.0);
- s = std::to_string(0.0l);
- s.clear();
-}
-'''
-
-@conf
-def check_std_to_string(self):
- if self.check_cxx(msg='Checking for std::to_string',
- fragment=STD_TO_STRING, mandatory=False):
- self.define('HAVE_STD_TO_STRING', 1)
-
-def configure(conf):
- conf.check_std_to_string()
diff --git a/ndn-cxx/detail/common.hpp b/ndn-cxx/detail/common.hpp
index 0e2b4d4..1136bd0 100644
--- a/ndn-cxx/detail/common.hpp
+++ b/ndn-cxx/detail/common.hpp
@@ -73,6 +73,7 @@
using std::const_pointer_cast;
using std::function;
+using std::to_string;
using namespace std::string_literals;
diff --git a/ndn-cxx/util/backports.hpp b/ndn-cxx/util/backports.hpp
index 5a41294..3977da1 100644
--- a/ndn-cxx/util/backports.hpp
+++ b/ndn-cxx/util/backports.hpp
@@ -28,30 +28,11 @@
#include <boost/predef/compiler/gcc.h>
#include <boost/predef/compiler/visualc.h>
-#ifndef NDN_CXX_HAVE_STD_TO_STRING
-#include <boost/lexical_cast.hpp>
-#endif
-
#include <utility>
namespace ndn {
//
-// https://redmine.named-data.net/issues/2743
-// std::to_string() (C++11)
-//
-#ifdef NDN_CXX_HAVE_STD_TO_STRING
-using std::to_string;
-#else
-template<typename T>
-std::string
-to_string(const T& val)
-{
- return boost::lexical_cast<std::string>(val);
-}
-#endif // NDN_CXX_HAVE_STD_TO_STRING
-
-//
// https://wg21.link/P1682
// std::to_underlying() (C++23)
//
diff --git a/wscript b/wscript
index 5dbdfa8..9e09ea6 100644
--- a/wscript
+++ b/wscript
@@ -9,8 +9,8 @@
def options(opt):
opt.load(['compiler_cxx', 'gnu_dirs', 'c_osx'])
- opt.load(['cross', 'default-compiler-flags', 'compiler-features',
- 'coverage', 'pch', 'sanitizers', 'osx-frameworks',
+ opt.load(['cross', 'default-compiler-flags', 'pch',
+ 'coverage', 'sanitizers', 'osx-frameworks',
'boost', 'openssl', 'sqlite3',
'doxygen', 'sphinx_build'],
tooldir=['.waf-tools'])
@@ -69,9 +69,9 @@
if not conf.options.enable_shared and not conf.options.enable_static:
conf.fatal('Either static library or shared library must be enabled')
- conf.load(['cross', 'compiler_cxx', 'gnu_dirs', 'c_osx',
- 'default-compiler-flags', 'compiler-features',
- 'pch', 'osx-frameworks', 'boost', 'openssl', 'sqlite3',
+ conf.load(['compiler_cxx', 'gnu_dirs', 'c_osx',
+ 'cross', 'default-compiler-flags', 'pch',
+ 'osx-frameworks', 'boost', 'openssl', 'sqlite3',
'doxygen', 'sphinx_build'])
conf.env.WITH_TESTS = conf.options.with_tests