Commit Graph

6 Commits

Author SHA1 Message Date
Emiel Bruijntjes cdcdaf79a3 added more constructors to AMQP::Envelope 2023-03-27 14:12:37 +02:00
Emiel Bruijntjes 48b9f05677 AMQP::Reliable::publish() now takes std::string_view + added extra constructor to AMQP::Envelope 2023-03-26 18:31:55 +02:00
Emiel Bruijntjes 96a6fa9a5c ability to store and retrieve envelopes 2020-08-17 15:16:24 +02:00
Peter A. Bigot d0b5189d1e Envelope: ensure const objects cannot be changed through _body
In commit 00b81949d3 where Message and
Envelope objects were made uncopiable the Envelope _body member was
changed from const char * to char * and a const_cast introduced to
remove the qualifier from the pointer passed to the constructor.

This technically produces undefined behavior when constructing an
Envelope() to publish data from a const buffer.  It also risks future
bugs if a new subclass of Envelope mutates const objects through the
_body pointer.

Envelope does not need to support mutable or owned content.  Move this
capability down to Message which is used in restricted situations where
the body size is set once and its content built up piecewise.
2018-04-20 18:27:53 -05:00
theirix 539128e559 Replaced C-casts with const_cast for Envelope::body_ 2018-04-18 14:59:35 +03:00
Aart Stuurman cf7261add5 Reordered public include files so they are now in include/amqpcpp/. 2018-01-24 01:58:18 +01:00