Skip to content

Commit 18caa15

Browse files
authored
Remove noexcept from delegate method stubs. (#1185)
In addition to removing noexcept from call_if, this is also needed to prevent an abort when cancelling a pthread that is executing a delegate.
1 parent c2e7e8a commit 18caa15

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

include/etl/private/delegate_cpp11.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ namespace etl
583583
/// Stub call for a member function. Run time instance.
584584
//*************************************************************************
585585
template <typename T, TReturn(T::*Method)(TParams...)>
586-
static ETL_CONSTEXPR14 TReturn method_stub(void* object, TParams... params) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
586+
static ETL_CONSTEXPR14 TReturn method_stub(void* object, TParams... params)
587587
{
588588
T* p = static_cast<T*>(object);
589589
return (p->*Method)(etl::forward<TParams>(params)...);
@@ -593,7 +593,7 @@ namespace etl
593593
/// Stub call for a const member function. Run time instance.
594594
//*************************************************************************
595595
template <typename T, TReturn(T::*Method)(TParams...) const>
596-
static ETL_CONSTEXPR14 TReturn const_method_stub(void* object, TParams... params) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
596+
static ETL_CONSTEXPR14 TReturn const_method_stub(void* object, TParams... params)
597597
{
598598
T* const p = static_cast<T*>(object);
599599
return (p->*Method)(etl::forward<TParams>(params)...);
@@ -603,7 +603,7 @@ namespace etl
603603
/// Stub call for a member function. Compile time instance.
604604
//*************************************************************************
605605
template <typename T, TReturn(T::*Method)(TParams...), T& Instance>
606-
static ETL_CONSTEXPR14 TReturn method_instance_stub(void*, TParams... params) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
606+
static ETL_CONSTEXPR14 TReturn method_instance_stub(void*, TParams... params)
607607
{
608608
return (Instance.*Method)(etl::forward<TParams>(params)...);
609609
}
@@ -612,7 +612,7 @@ namespace etl
612612
/// Stub call for a const member function. Compile time instance.
613613
//*************************************************************************
614614
template <typename T, TReturn(T::*Method)(TParams...) const, const T& Instance>
615-
static ETL_CONSTEXPR14 TReturn const_method_instance_stub(void*, TParams... params) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
615+
static ETL_CONSTEXPR14 TReturn const_method_instance_stub(void*, TParams... params)
616616
{
617617
return (Instance.*Method)(etl::forward<TParams>(params)...);
618618
}
@@ -622,7 +622,7 @@ namespace etl
622622
/// Stub call for a function operator. Compile time instance.
623623
//*************************************************************************
624624
template <typename T, T& Instance>
625-
static ETL_CONSTEXPR14 TReturn operator_instance_stub(void*, TParams... params) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
625+
static ETL_CONSTEXPR14 TReturn operator_instance_stub(void*, TParams... params)
626626
{
627627
return Instance.operator()(etl::forward<TParams>(params)...);
628628
}
@@ -632,7 +632,7 @@ namespace etl
632632
/// Stub call for a free function.
633633
//*************************************************************************
634634
template <TReturn(*Method)(TParams...)>
635-
static ETL_CONSTEXPR14 TReturn function_stub(void*, TParams... params) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
635+
static ETL_CONSTEXPR14 TReturn function_stub(void*, TParams... params)
636636
{
637637
return (Method)(etl::forward<TParams>(params)...);
638638
}
@@ -641,7 +641,7 @@ namespace etl
641641
/// Stub call for a lambda or functor function.
642642
//*************************************************************************
643643
template <typename TLambda>
644-
static ETL_CONSTEXPR14 TReturn lambda_stub(void* object, TParams... arg) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
644+
static ETL_CONSTEXPR14 TReturn lambda_stub(void* object, TParams... arg)
645645
{
646646
TLambda* p = static_cast<TLambda*>(object);
647647
return (p->operator())(etl::forward<TParams>(arg)...);
@@ -651,7 +651,7 @@ namespace etl
651651
/// Stub call for a const lambda or functor function.
652652
//*************************************************************************
653653
template <typename TLambda>
654-
static ETL_CONSTEXPR14 TReturn const_lambda_stub(void* object, TParams... arg) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS)
654+
static ETL_CONSTEXPR14 TReturn const_lambda_stub(void* object, TParams... arg)
655655
{
656656
const TLambda* p = static_cast<const TLambda*>(object);
657657
return (p->operator())(etl::forward<TParams>(arg)...);

0 commit comments

Comments
 (0)