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

Inconsistency of message's data constness #112

Open
oliora opened this issue Sep 28, 2015 · 1 comment
Open

Inconsistency of message's data constness #112

oliora opened this issue Sep 28, 2015 · 1 comment

Comments

@oliora
Copy link

oliora commented Sep 28, 2015

Some azmq::message constructors accept const buffer and some accept mutable buffer (i.e. can not be used to construct from const buffer). The accessors of message are const except one (non-const buffer()).

I propose to change message to be constructed only from const buffer (remember that mutable buffer is convertible to const buffer) and to remove all non-const accessors, so message can not be used to modify the buffer it created from.

This change means that non-const buffer() should be removed. I never used this function in my code but I can assume that there are use cases when this function is needed. Let's discuss this use cases and find a way to satisfy them with new message design.

@oliora oliora changed the title Inconsistency of message interface Inconsistency of message's data constness Sep 28, 2015
@oliora
Copy link
Author

oliora commented Oct 22, 2015

@rodgert what do you think about this issue?

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