AMQP-CPP/include
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
..
amqpcpp Envelope: ensure const objects cannot be changed through _body 2018-04-20 18:27:53 -05:00
amqpcpp.h added ability to set the handle to the openssl library (so that programs that load openssl via dlopen() can still use amqp-cpp) 2018-03-09 15:08:52 +01:00