Skip to content

Commit

Permalink
GCC 10 and 11 support
Browse files Browse the repository at this point in the history
  • Loading branch information
tttapa committed Sep 5, 2023
1 parent 56fc184 commit daa7d1a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions interfaces/python/src/problem/problems.py.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void functional_setter_ret(FuncProb &p, std::optional<py::object> o) {
throw std::runtime_error("FunctionalProblem function is None");
};
}
};
}

template <class FuncProb, auto py_f, auto f, class Out, class Ret, class... Args>
void functional_setter_out(FuncProb &p, std::optional<py::object> o) {
Expand All @@ -46,7 +46,7 @@ void functional_setter_out(FuncProb &p, std::optional<py::object> o) {
throw std::runtime_error("FunctionalProblem function is None");
};
}
};
}

template <class T, class... Args>
void problem_constr_proj_methods(py::class_<T, Args...> &cls) {
Expand Down
2 changes: 1 addition & 1 deletion interfaces/python/src/util/async.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ auto async_solve(bool async, bool suppress_interrupt, Solver &solver, Invoker &i
StreamReplacer stream{&solver};
// Invoke the solver synchronously
auto &&stats = invoke_solver();
return stats;
return static_cast<decltype(stats) &&>(stats);
} else {
// Check that the user doesn't use the same solver/problem in multiple threads
ThreadChecker solver_checker{&solver};
Expand Down
4 changes: 4 additions & 0 deletions src/alpaqa/include/alpaqa/util/tag-invoke.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ namespace tag_invoke_fn_ns {
/// Poison pill to hide overloads of foo() that might be found in parent
/// namespace.
/// We want to limit to only finding overloads by ADL.
#if defined(__GNUC__) && __GNUC__ < 12 && !defined(__clang__)
void alpaqa_tag_invoke() /* = delete */;
#else
void alpaqa_tag_invoke() = delete;
#endif

struct tag_invoke_fn {
template <typename Tag, typename... Args>
Expand Down
2 changes: 1 addition & 1 deletion src/alpaqa/src/driver/cancel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace alpaqa {

namespace detail {
inline std::atomic<void *> solver_to_stop;
};
}

/**
* Attach SIGINT and SIGTERM handlers to stop the given solver.
Expand Down

0 comments on commit daa7d1a

Please sign in to comment.