29 #ifndef NDN_CXX_DETAIL_COMMON_HPP
30 #define NDN_CXX_DETAIL_COMMON_HPP
32 #include "ndn-cxx/detail/config.hpp"
35 #if __cplusplus < 201703L
36 #error "ndn-cxx applications must be compiled using the C++17 standard (-std=c++17)"
41 #ifdef NDN_CXX_WITH_TESTS
42 #define NDN_CXX_VIRTUAL_WITH_TESTS virtual
43 #define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED public
44 #define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE public
45 #define NDN_CXX_PROTECTED_WITH_TESTS_ELSE_PRIVATE protected
47 #define NDN_CXX_VIRTUAL_WITH_TESTS
48 #define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED protected
49 #define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE private
50 #define NDN_CXX_PROTECTED_WITH_TESTS_ELSE_PRIVATE private
60 #include <string_view>
61 #include <type_traits>
66 using std::shared_ptr;
67 using std::unique_ptr;
69 using std::make_shared;
70 using std::make_unique;
73 using namespace std::string_literals;
74 using namespace std::string_view_literals;
78 using namespace std::placeholders;
80 #include <boost/version.hpp>
84 #if BOOST_VERSION < 107600
85 #define BOOST_BIND_NO_PLACEHOLDERS
86 #include <boost/is_placeholder.hpp>
88 #define NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER(N) \
90 struct is_placeholder<std::remove_const_t<decltype(_##N)>> \
96 NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER(1)
97 NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER(2)
98 NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER(3)
99 NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER(4)
100 NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER(5)
101 NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER(6)
102 NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER(7)
103 NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER(8)
104 NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER(9)
105 #undef NDN_CXX_SPECIALIZE_BOOST_IS_PLACEHOLDER_FOR_STD_PLACEHOLDER
110 #include <boost/assert.hpp>
111 #include <boost/core/noncopyable.hpp>
114 using boost::noncopyable;
std::string to_string(const errinfo_stacktrace &x)