diff --git a/include/chaiscript/dispatchkit/dispatchkit.hpp b/include/chaiscript/dispatchkit/dispatchkit.hpp index f38147c0..d138d653 100644 --- a/include/chaiscript/dispatchkit/dispatchkit.hpp +++ b/include/chaiscript/dispatchkit/dispatchkit.hpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/include/chaiscript/dispatchkit/handle_return.hpp b/include/chaiscript/dispatchkit/handle_return.hpp index 2bc296d3..093d78fb 100644 --- a/include/chaiscript/dispatchkit/handle_return.hpp +++ b/include/chaiscript/dispatchkit/handle_return.hpp @@ -32,12 +32,12 @@ namespace chaiscript { /// Used internally for handling a return value from a Proxy_Function call template struct Handle_Return { - template>>> + template> && std::is_trivially_default_constructible_v>>> static Boxed_Value handle(T r) { return Boxed_Value(std::move(r), true); } - template>)>> + template> && std::is_trivially_default_constructible_v>)>> static Boxed_Value handle(T &&r) { return Boxed_Value(std::make_shared(std::forward(r)), true); } diff --git a/include/chaiscript/dispatchkit/proxy_functions.hpp b/include/chaiscript/dispatchkit/proxy_functions.hpp index e0e10163..d7dce6f0 100644 --- a/include/chaiscript/dispatchkit/proxy_functions.hpp +++ b/include/chaiscript/dispatchkit/proxy_functions.hpp @@ -410,7 +410,7 @@ namespace chaiscript { public: Dynamic_Proxy_Function_Impl(Callable t_f, int t_arity = -1, - std::shared_ptr t_parsenode = AST_NodePtr(), + std::shared_ptr t_parsenode = nullptr, Param_Types t_param_types = Param_Types(), Proxy_Function t_guard = Proxy_Function()) : Dynamic_Proxy_Function(t_arity, std::move(t_parsenode), std::move(t_param_types), std::move(t_guard)) diff --git a/include/chaiscript/language/chaiscript_common.hpp b/include/chaiscript/language/chaiscript_common.hpp index 0d80b8ca..dd4e96c0 100644 --- a/include/chaiscript/language/chaiscript_common.hpp +++ b/include/chaiscript/language/chaiscript_common.hpp @@ -349,14 +349,14 @@ namespace chaiscript { ss << what(); if (!call_stack.empty()) { - ss << "during evaluation at (" << fname(call_stack[0]) << " " << startpos(call_stack[0]) << ")\n"; + ss << "during evaluation at (" << fname(call_stack.at(0)) << " " << startpos(call_stack.at(0)) << ")\n"; ss << '\n' << detail << '\n'; - ss << " " << fname(call_stack[0]) << " (" << startpos(call_stack[0]) << ") '" << pretty(call_stack[0]) << "'"; + ss << " " << fname(call_stack.at(0)) << " (" << startpos(call_stack.at(0)) << ") '" << pretty(call_stack.at(0)) << "'"; for (size_t j = 1; j < call_stack.size(); ++j) { - if (id(call_stack[j]) != chaiscript::AST_Node_Type::Block && id(call_stack[j]) != chaiscript::AST_Node_Type::File) { + if (id(call_stack.at(j)) != chaiscript::AST_Node_Type::Block && id(call_stack.at(j)) != chaiscript::AST_Node_Type::File) { ss << '\n'; - ss << " from " << fname(call_stack[j]) << " (" << startpos(call_stack[j]) << ") '" << pretty(call_stack[j]) << "'"; + ss << " from " << fname(call_stack.at(j)) << " (" << startpos(call_stack.at(j)) << ") '" << pretty(call_stack.at(j)) << "'"; } } }