diff --git a/include/chaiscript/dispatchkit/bootstrap.hpp b/include/chaiscript/dispatchkit/bootstrap.hpp index 1173d22..f6c2483 100644 --- a/include/chaiscript/dispatchkit/bootstrap.hpp +++ b/include/chaiscript/dispatchkit/bootstrap.hpp @@ -148,10 +148,10 @@ namespace chaiscript * Specific version of shared_ptr_clone just for Proxy_Functions */ template - std::shared_ptr::type> - shared_ptr_unconst_clone(const std::shared_ptr::type> &p) + std::shared_ptr::type> + shared_ptr_unconst_clone(const std::shared_ptr::type> &p) { - return std::const_pointer_cast::type>(p); + return std::const_pointer_cast::type>(p); } @@ -466,8 +466,8 @@ namespace chaiscript "bind"); m->add(fun(&shared_ptr_unconst_clone), "clone"); - m->add(fun(&ptr_assign::type>), "="); - m->add(fun(&ptr_assign::type>), "="); + m->add(fun(&ptr_assign::type>), "="); + m->add(fun(&ptr_assign::type>), "="); m->add(Proxy_Function(new dispatch::Dynamic_Proxy_Function(std::bind(&call_exists, std::placeholders::_1))), "call_exists"); diff --git a/include/chaiscript/dispatchkit/boxed_cast.hpp b/include/chaiscript/dispatchkit/boxed_cast.hpp index 98c85e1..c10aa72 100644 --- a/include/chaiscript/dispatchkit/boxed_cast.hpp +++ b/include/chaiscript/dispatchkit/boxed_cast.hpp @@ -14,9 +14,6 @@ #include "../chaiscript_threading.hpp" #include -#include -#include -#include namespace chaiscript { @@ -77,7 +74,7 @@ namespace chaiscript #pragma warning(disable : 4127) #endif - if (boost::is_polymorphic::type>::value) + if (std::is_polymorphic::type>::value) { try { // We will not catch any bad_boxed_dynamic_cast that is thrown, let the user get it diff --git a/include/chaiscript/dispatchkit/boxed_cast_helper.hpp b/include/chaiscript/dispatchkit/boxed_cast_helper.hpp index 899011a..ae23556 100644 --- a/include/chaiscript/dispatchkit/boxed_cast_helper.hpp +++ b/include/chaiscript/dispatchkit/boxed_cast_helper.hpp @@ -11,7 +11,6 @@ #include "boxed_value.hpp" #include -#include namespace chaiscript { @@ -25,7 +24,7 @@ namespace chaiscript template struct Cast_Helper_Inner { - typedef typename std::reference_wrapper::type > Result_Type; + typedef typename std::reference_wrapper::type > Result_Type; static Result_Type cast(const Boxed_Value &ob) { diff --git a/include/chaiscript/dispatchkit/boxed_value.hpp b/include/chaiscript/dispatchkit/boxed_value.hpp index a850340..76a785f 100644 --- a/include/chaiscript/dispatchkit/boxed_value.hpp +++ b/include/chaiscript/dispatchkit/boxed_value.hpp @@ -13,8 +13,6 @@ #include #include -#include -#include namespace chaiscript { @@ -296,7 +294,7 @@ namespace chaiscript template Boxed_Value const_var_impl(const T &t) { - return Boxed_Value(std::shared_ptr::type >(new T(t))); + return Boxed_Value(std::shared_ptr::type >(new T(t))); } /// \brief Takes a pointer to a value, adds const to the pointed to type and returns an immutable Boxed_Value. @@ -307,7 +305,7 @@ namespace chaiscript template Boxed_Value const_var_impl(T *t) { - return Boxed_Value( const_cast::type *>(t) ); + return Boxed_Value( const_cast::type *>(t) ); } /// \brief Takes a std::shared_ptr to a value, adds const to the pointed to type and returns an immutable Boxed_Value. @@ -318,7 +316,7 @@ namespace chaiscript template Boxed_Value const_var_impl(const std::shared_ptr &t) { - return Boxed_Value( std::const_pointer_cast::type>(t) ); + return Boxed_Value( std::const_pointer_cast::type>(t) ); } /// \brief Takes a std::reference_wrapper value, adds const to the referenced type and returns an immutable Boxed_Value. diff --git a/include/chaiscript/dispatchkit/dynamic_cast_conversion.hpp b/include/chaiscript/dispatchkit/dynamic_cast_conversion.hpp index 6b888c3..054dcd4 100644 --- a/include/chaiscript/dispatchkit/dynamic_cast_conversion.hpp +++ b/include/chaiscript/dispatchkit/dynamic_cast_conversion.hpp @@ -12,8 +12,6 @@ #include "boxed_cast_helper.hpp" #include "bad_boxed_cast.hpp" #include -#include -#include namespace chaiscript { @@ -249,9 +247,9 @@ namespace chaiscript { //Can only be used with related polymorphic types //may be expanded some day to support conversions other than child -> parent - BOOST_STATIC_ASSERT((boost::is_base_of::value)); - BOOST_STATIC_ASSERT(boost::is_polymorphic::value); - BOOST_STATIC_ASSERT(boost::is_polymorphic::value); + BOOST_STATIC_ASSERT((std::is_base_of::value)); + BOOST_STATIC_ASSERT(std::is_polymorphic::value); + BOOST_STATIC_ASSERT(std::is_polymorphic::value); return detail::Dynamic_Conversions::create(); } diff --git a/include/chaiscript/dispatchkit/function_call_detail.hpp b/include/chaiscript/dispatchkit/function_call_detail.hpp index 5c9d9e1..e531205 100644 --- a/include/chaiscript/dispatchkit/function_call_detail.hpp +++ b/include/chaiscript/dispatchkit/function_call_detail.hpp @@ -6,7 +6,7 @@ #include -#define addparam(z,n,text) params.push_back((boost::is_reference::value&&!(boost::is_same::type>::type>::value))?Boxed_Value(std::ref(BOOST_PP_CAT(p, n))):Boxed_Value(BOOST_PP_CAT(p, n) )); +#define addparam(z,n,text) params.push_back((std::is_reference::value&&!(std::is_same::type>::type>::value))?Boxed_Value(std::ref(BOOST_PP_CAT(p, n))):Boxed_Value(BOOST_PP_CAT(p, n) )); #define curry(z,n,text) BOOST_PP_CAT(std::placeholders::_, BOOST_PP_INC(n)) diff --git a/include/chaiscript/dispatchkit/proxy_functions.hpp b/include/chaiscript/dispatchkit/proxy_functions.hpp index df15372..f25b43b 100644 --- a/include/chaiscript/dispatchkit/proxy_functions.hpp +++ b/include/chaiscript/dispatchkit/proxy_functions.hpp @@ -12,7 +12,7 @@ #include "boxed_value.hpp" #include "type_info.hpp" #include -#include +#include #include #include #include "proxy_functions_detail.hpp" @@ -554,10 +554,10 @@ namespace chaiscript if (bv.is_const()) { const Class *o = boxed_cast(bv); - return detail::Handle_Return::type>::handle(o->*m_attr); + return detail::Handle_Return::type>::handle(o->*m_attr); } else { Class *o = boxed_cast(bv); - return detail::Handle_Return::type>::handle(o->*m_attr); + return detail::Handle_Return::type>::handle(o->*m_attr); } } else { throw exception::arity_error(static_cast(params.size()), 1); diff --git a/include/chaiscript/dispatchkit/type_info.hpp b/include/chaiscript/dispatchkit/type_info.hpp index 363549a..87eddea 100644 --- a/include/chaiscript/dispatchkit/type_info.hpp +++ b/include/chaiscript/dispatchkit/type_info.hpp @@ -10,15 +10,7 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include namespace chaiscript { @@ -28,7 +20,7 @@ namespace chaiscript template struct Bare_Type { - typedef typename boost::remove_const::type>::type>::type type; + typedef typename std::remove_const::type>::type>::type type; }; } @@ -147,9 +139,9 @@ namespace chaiscript static Type_Info get() { - return Type_Info(boost::is_const::type>::type>::value, boost::is_reference::value, boost::is_pointer::value, - boost::is_void::value, - boost::is_arithmetic::value && !boost::is_same::type, bool>::value, + return Type_Info(std::is_const::type>::type>::value, std::is_reference::value, std::is_pointer::value, + std::is_void::value, + std::is_arithmetic::value && !std::is_same::type, bool>::value, &typeid(T), &typeid(typename Bare_Type::type)); } @@ -162,9 +154,9 @@ namespace chaiscript static Type_Info get() { - return Type_Info(boost::is_const::value, boost::is_reference::value, boost::is_pointer::value, - boost::is_void::value, - boost::is_arithmetic::value && !boost::is_same::type, bool>::value, + return Type_Info(std::is_const::value, std::is_reference::value, std::is_pointer::value, + std::is_void::value, + std::is_arithmetic::value && !std::is_same::type, bool>::value, &typeid(std::shared_ptr ), &typeid(typename Bare_Type::type)); } @@ -177,9 +169,9 @@ namespace chaiscript static Type_Info get() { - return Type_Info(boost::is_const::value, boost::is_reference::value, boost::is_pointer::value, - boost::is_void::value, - boost::is_arithmetic::value && !boost::is_same::type, bool>::value, + return Type_Info(std::is_const::value, std::is_reference::value, std::is_pointer::value, + std::is_void::value, + std::is_arithmetic::value && !std::is_same::type, bool>::value, &typeid(const std::shared_ptr &), &typeid(typename Bare_Type::type)); } @@ -192,9 +184,9 @@ namespace chaiscript static Type_Info get() { - return Type_Info(boost::is_const::value, boost::is_reference::value, boost::is_pointer::value, - boost::is_void::value, - boost::is_arithmetic::value && !boost::is_same::type, bool>::value, + return Type_Info(std::is_const::value, std::is_reference::value, std::is_pointer::value, + std::is_void::value, + std::is_arithmetic::value && !std::is_same::type, bool>::value, &typeid(std::reference_wrapper ), &typeid(typename Bare_Type::type)); } @@ -207,9 +199,9 @@ namespace chaiscript static Type_Info get() { - return Type_Info(boost::is_const::value, boost::is_reference::value, boost::is_pointer::value, - boost::is_void::value, - boost::is_arithmetic::value && !boost::is_same::type, bool>::value, + return Type_Info(std::is_const::value, std::is_reference::value, std::is_pointer::value, + std::is_void::value, + std::is_arithmetic::value && !std::is_same::type, bool>::value, &typeid(const std::reference_wrapper &), &typeid(typename Bare_Type::type)); } diff --git a/src/main.cpp b/src/main.cpp index b1ca539..9cec2db 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -80,7 +80,7 @@ std::string get_next_command() { char *input_raw = readline("eval> "); if ( input_raw ) { add_history(input_raw); - retval = boost::trim_copy_if(std::string(input_raw),boost::is_any_of(" \t")); + retval = boost::trim_copy_if(std::string(input_raw),boost::algorithm::is_any_of(" \t")); ::free(input_raw); } } diff --git a/unittests/boxed_cast_test.cpp b/unittests/boxed_cast_test.cpp index c183731..4a32846 100644 --- a/unittests/boxed_cast_test.cpp +++ b/unittests/boxed_cast_test.cpp @@ -46,7 +46,7 @@ bool test_type_conversion(const Boxed_Value &bv, bool expectedpass) std::cerr << "Error with type conversion test. From: " << (bv.is_const()?(std::string("const ")):(std::string())) << bv.get_type_info().name() << " To: " - << (boost::is_const::value?(std::string("const ")):(std::string())) << typeid(To).name() + << (std::is_const::value?(std::string("const ")):(std::string())) << typeid(To).name() << " test was expected to " << ((expectedpass)?(std::string("succeed")):(std::string("fail"))) << " but did not" << std::endl; }