Skip to content

Commit

Permalink
call_function: Fix with destructor default noexcept.
Browse files Browse the repository at this point in the history
The call_function<R>() 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().
  • Loading branch information
Oberon00 committed Jul 5, 2013
1 parent 204ef5d commit 81bdcb7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions luabind/detail/call_function.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ namespace luabind
rhs.m_called = true;
}

~proxy_function_caller()
~proxy_function_caller() BOOST_NOEXCEPT_IF(false)
{
if (m_called) return;

Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 81bdcb7

Please sign in to comment.