Skip to content

Commit

Permalink
Fix C++11 constexpr errors in invoke_r<void>
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Apr 6, 2024
1 parent 984d6b3 commit a91461a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/boost/compat/invoke.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ template<class F, class... A> struct is_nothrow_invocable: conditional_t< is_inv
// invoke_r

template<class R, class F, class... A, class En = enable_if_t<
std::is_void<R>::value && is_invocable<F, A...>::value>>
std::is_void<R>::value && is_invocable<F, A...>::value >>
constexpr R invoke_r( F&& f, A&&... a )
noexcept( is_nothrow_invocable<F, A...>::value )
noexcept( noexcept( static_cast<R>( compat::invoke( std::forward<F>(f), std::forward<A>(a)... ) ) ) )
{
compat::invoke( std::forward<F>(f), std::forward<A>(a)... );
return static_cast<R>( compat::invoke( std::forward<F>(f), std::forward<A>(a)... ) );
}

template<class R, class F, class... A, class = void, class En = enable_if_t<
Expand Down

0 comments on commit a91461a

Please sign in to comment.