diff --git a/SG14/inplace_function.h b/SG14/inplace_function.h index 0db50777..f36d988b 100644 --- a/SG14/inplace_function.h +++ b/SG14/inplace_function.h @@ -30,6 +30,10 @@ #include #include +#ifndef SG14_INPLACE_FUNCTION_THROW +#define SG14_INPLACE_FUNCTION_THROW(x) throw (x) +#endif + namespace stdext { namespace inplace_function_detail { @@ -92,7 +96,7 @@ template struct vtable explicit constexpr vtable() noexcept : invoke_ptr{ [](storage_ptr_t, Args&&...) -> R - { throw std::bad_function_call(); } + { SG14_INPLACE_FUNCTION_THROW(std::bad_function_call()); } }, copy_ptr{ [](storage_ptr_t, storage_ptr_t) -> void {} }, relocate_ptr{ [](storage_ptr_t, storage_ptr_t) -> void {} },