Skip to content

Inconsistency of message's data constness #112

Open
@oliora

Description

@oliora

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions