Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/boost/capy/concept/executor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ template<class E>
concept Executor =
std::is_nothrow_copy_constructible_v<E> &&
std::is_nothrow_move_constructible_v<E> &&
requires(E& e, E const& ce, E const& ce2, continuation c) {
requires(E& e, E const& ce, E const& ce2, continuation& c) {
{ ce == ce2 } noexcept -> std::convertible_to<bool>;
{ ce.context() } noexcept;
requires std::is_lvalue_reference_v<decltype(ce.context())> &&
Expand Down
8 changes: 5 additions & 3 deletions include/boost/capy/ex/executor_ref.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include <boost/capy/detail/config.hpp>
#include <boost/capy/detail/type_id.hpp>
#include <boost/capy/concept/executor.hpp>
#include <boost/capy/continuation.hpp>
#include <concepts>
#include <coroutine>
Expand Down Expand Up @@ -149,7 +150,8 @@ class executor_ref
std::decay_t<Ex>, executor_ref>, int> = 0>
#else
template<class Ex>
requires (!std::same_as<std::decay_t<Ex>, executor_ref>)
requires (!std::same_as<std::decay_t<Ex>, executor_ref>
&& Executor<Ex>)
#endif
executor_ref(Ex const& ex) noexcept
: ex_(&ex)
Expand Down Expand Up @@ -266,7 +268,7 @@ class executor_ref
`nullptr` if the type does not match.
*/
template< typename Executor >
const Executor* target() const
const Executor* target() const noexcept
{
if ( *vt_->type_id == detail::type_id< Executor >() )
return static_cast< Executor const* >( ex_ );
Expand All @@ -275,7 +277,7 @@ class executor_ref

/// @copydoc target() const
template< typename Executor>
Executor* target()
Executor* target() noexcept
{
if ( *vt_->type_id == detail::type_id< Executor >() )
return const_cast< Executor* >(
Expand Down
Loading