Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

so_5::details::make_message_instance_impl metafunction doesn't set message mutability flag properly #68

Closed
eao197 opened this issue Sep 19, 2023 · 1 comment
Assignees
Milestone

Comments

@eao197
Copy link
Member

eao197 commented Sep 19, 2023

It seems that make_message_instance_impl should call mark_as_mutable_if_necessary:

template< bool is_signal, typename Msg >
struct make_message_instance_impl
{
using E = typename message_payload_type< Msg >::envelope_type;
template< typename... Args >
[[nodiscard]]
static std::unique_ptr< E >
make( Args &&... args )
{
ensure_not_signal< Msg >();
return std::unique_ptr< E >( new E( std::forward< Args >(args)... ) );
}
};

Without this call limit_then_transform can make a mutable message and send it into MPMC mbox.

@eao197 eao197 added this to the SO-5.8.1 milestone Sep 19, 2023
@eao197 eao197 self-assigned this Sep 19, 2023
eao197 added a commit that referenced this issue Sep 19, 2023
eao197 added a commit that referenced this issue Sep 21, 2023
There is no more helper mark_as_mutable_msg_if_necessary.
The mutability mark is automatically set by make_message_instance
template function.
@eao197
Copy link
Member Author

eao197 commented Oct 12, 2023

The fix will be a part of upcoming 5.8.1 release.

@eao197 eao197 closed this as completed Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant