diff --git a/.waf-tools/compiler-features.py b/.waf-tools/compiler-features.py deleted file mode 100644 index 1602f168..00000000 --- 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 -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 0e2b4d4e..1136bd0e 100644 --- a/ndn-cxx/detail/common.hpp +++ b/ndn-cxx/detail/common.hpp @@ -73,6 +73,7 @@ using std::dynamic_pointer_cast; 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 5a41294a..3977da1d 100644 --- a/ndn-cxx/util/backports.hpp +++ b/ndn-cxx/util/backports.hpp @@ -28,29 +28,10 @@ #include #include -#ifndef NDN_CXX_HAVE_STD_TO_STRING -#include -#endif - #include 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 -std::string -to_string(const T& val) -{ - return boost::lexical_cast(val); -} -#endif // NDN_CXX_HAVE_STD_TO_STRING - // // https://wg21.link/P1682 // std::to_underlying() (C++23) diff --git a/wscript b/wscript index 5dbdfa80..9e09ea6c 100644 --- a/wscript +++ b/wscript @@ -9,8 +9,8 @@ GIT_TAG_PREFIX = 'ndn-cxx-' 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 @@ def configure(conf): 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