From 889966d1e32d4ba96983621f15c95afa0283c025 Mon Sep 17 00:00:00 2001 From: Oscar Cowdery Lack Date: Sat, 2 Nov 2024 07:15:08 +1100 Subject: [PATCH] fix: Fix build with boost 1.86 - Fix resolution of boost::asio::spawn overload. See https://github.com/chriskohlhoff/asio/issues/1524 --- src/accelerator/ogl/util/device.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/accelerator/ogl/util/device.cpp b/src/accelerator/ogl/util/device.cpp index 31a9133940..74e30bd7f4 100644 --- a/src/accelerator/ogl/util/device.cpp +++ b/src/accelerator/ogl/util/device.cpp @@ -150,7 +150,9 @@ struct device::impl : public std::enable_shared_from_this auto task = task_type(std::forward(func)); auto future = task.get_future(); - boost::asio::spawn(service_, std::move(task)); + boost::asio::spawn(service_, std::move(task), [](std::exception_ptr e) { + if (e) std::rethrow_exception(e); + }); return future; }