From 81bdcb72aa6ef7b321e59416b77be65c3944d6a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Neun=C3=BCller?= Date: Fri, 5 Jul 2013 17:21:42 +0200 Subject: [PATCH] call_function: Fix with destructor default noexcept. The call_function() functions return a proxy object to allow applying policies and do the actual call in the destructor if no policies were applied and the return value was not used. Thus, the destructors might throw luabind::error exceptions and need to be marked as noexcept(false). This caused test_free_functions and test_lua_classes to fail with std::terminate(). --- luabind/detail/call_function.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/luabind/detail/call_function.hpp b/luabind/detail/call_function.hpp index e4e4bf1d..136692dc 100644 --- a/luabind/detail/call_function.hpp +++ b/luabind/detail/call_function.hpp @@ -79,7 +79,7 @@ namespace luabind rhs.m_called = true; } - ~proxy_function_caller() + ~proxy_function_caller() BOOST_NOEXCEPT_IF(false) { if (m_called) return; @@ -249,7 +249,7 @@ namespace luabind rhs.m_called = true; } - ~proxy_function_void_caller() + ~proxy_function_void_caller() BOOST_NOEXCEPT_IF(false) { if (m_called) return;