The copy constructor argument Richard Hadsell mentioned I hadn't even considered and it is a good argument in its own right.
I would like to strengthen Richard's remarks: The newly proposed class violates the "rule of three", because it define's the d'tor, but forget's to implement copy c'tor and copy-assignment op (which is, as Richard already said, a bad idea here).
Astonishingly for an
expert...
This really should be emphasized. Having a pointer to dynamically allocated buffer without custom copy constructor/copy assignment?Sooner or later somebody will try to copy it ...
Please read the docs! There is clearly written that this class is derived from noncopyable (boost utility class!!!).
The source does not contain the derivation but define private declarations of copy ctor and assignment operator. So there is no way to copy this class.
Not the original Context class, no. I was refering to the so called optimized version. I see no private copy ctor and assignment operator there. Leon