You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
oliora
changed the title
Inconsistency of message interface
Inconsistency of message's data constness
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 ofmessage
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, somessage
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 newmessage
design.The text was updated successfully, but these errors were encountered: