Skip to content

MTL does not work with typed_actor that use traits #2280

Description

@Neverlord

From mtl.hpp:

  template <class... Fs, class Timeout, class OnResult, class OnError>
  bool try_request(const typed_actor<Fs...>& dst, Timeout timeout,
                   OnResult on_result, OnError on_error) {
    using on_error_result = decltype(on_error(std::declval<error&>()));
    static_assert(std::is_same_v<void, on_error_result>);
    auto dst_hdl = actor_cast<actor>(dst);
    return (detail::mtl_util<Fs>::request(self_, dst_hdl, timeout, adapter_,
                                          *reader_, on_result, on_error)
            || ...);
  }

This code still assumes that typed_actor has the message handler signatures. Passing a typed_actor that is using a trait won't work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions