Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix errors and warnings when compiling with C++26.
  • Loading branch information
jaytea committed Sep 11, 2026
commit 9d1dde408c90a7dbddcd98e06485b8fc5a7ae7a4
1 change: 1 addition & 0 deletions include/chaiscript/dispatchkit/dispatchkit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <memory>
#include <set>
#include <stdexcept>
#include <exception>
#include <string>
#include <string_view>
#include <thread>
Expand Down
4 changes: 2 additions & 2 deletions include/chaiscript/dispatchkit/handle_return.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ namespace chaiscript {
/// Used internally for handling a return value from a Proxy_Function call
template<typename Ret>
struct Handle_Return {
template<typename T, typename = typename std::enable_if_t<std::is_trivial_v<typename std::decay_t<T>>>>
template<typename T, typename = typename std::enable_if_t<std::is_trivially_copyable_v<typename std::decay_t<T>> && std::is_trivially_default_constructible_v<typename std::decay_t<T>>>>
static Boxed_Value handle(T r) {
return Boxed_Value(std::move(r), true);
}

template<typename T, typename = typename std::enable_if_t<!(std::is_trivial_v<typename std::decay_t<T>>)>>
template<typename T, typename = typename std::enable_if_t<!(std::is_trivially_copyable_v<typename std::decay_t<T>> && std::is_trivially_default_constructible_v<typename std::decay_t<T>>)>>
static Boxed_Value handle(T &&r) {
return Boxed_Value(std::make_shared<T>(std::forward<T>(r)), true);
}
Expand Down
2 changes: 1 addition & 1 deletion include/chaiscript/dispatchkit/proxy_functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ namespace chaiscript {
public:
Dynamic_Proxy_Function_Impl(Callable t_f,
int t_arity = -1,
std::shared_ptr<AST_Node> t_parsenode = AST_NodePtr(),
std::shared_ptr<AST_Node> 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))
Expand Down
8 changes: 4 additions & 4 deletions include/chaiscript/language/chaiscript_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)) << "'";
}
}
}
Expand Down
Loading