diff --git a/interfaces/python/src/problem/problems.py.cpp b/interfaces/python/src/problem/problems.py.cpp index adb5cb67ca..1e41afe5bf 100644 --- a/interfaces/python/src/problem/problems.py.cpp +++ b/interfaces/python/src/problem/problems.py.cpp @@ -33,7 +33,7 @@ void functional_setter_ret(FuncProb &p, std::optional o) { throw std::runtime_error("FunctionalProblem function is None"); }; } -}; +} template void functional_setter_out(FuncProb &p, std::optional o) { @@ -46,7 +46,7 @@ void functional_setter_out(FuncProb &p, std::optional o) { throw std::runtime_error("FunctionalProblem function is None"); }; } -}; +} template void problem_constr_proj_methods(py::class_ &cls) { diff --git a/interfaces/python/src/util/async.hpp b/interfaces/python/src/util/async.hpp index 6ee745fb87..f19e4af736 100644 --- a/interfaces/python/src/util/async.hpp +++ b/interfaces/python/src/util/async.hpp @@ -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(stats); } else { // Check that the user doesn't use the same solver/problem in multiple threads ThreadChecker solver_checker{&solver}; diff --git a/src/alpaqa/include/alpaqa/util/tag-invoke.hpp b/src/alpaqa/include/alpaqa/util/tag-invoke.hpp index 8cd2b788f1..5d4950ee68 100644 --- a/src/alpaqa/include/alpaqa/util/tag-invoke.hpp +++ b/src/alpaqa/include/alpaqa/util/tag-invoke.hpp @@ -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 diff --git a/src/alpaqa/src/driver/cancel.hpp b/src/alpaqa/src/driver/cancel.hpp index f30bc91197..a5819e0083 100644 --- a/src/alpaqa/src/driver/cancel.hpp +++ b/src/alpaqa/src/driver/cancel.hpp @@ -9,7 +9,7 @@ namespace alpaqa { namespace detail { inline std::atomic solver_to_stop; -}; +} /** * Attach SIGINT and SIGTERM handlers to stop the given solver.