add epics::auto_ptr<T> and epics::swap()

Avoid the flood of auto_ptr deprecation warnings
in the common cases of using auto_ptr
to automatically delete.
This commit is contained in:
Michael Davidsaver
2017-11-06 12:30:40 -06:00
parent 284e49c807
commit c590204cf9
6 changed files with 58 additions and 15 deletions

View File

@@ -26,7 +26,7 @@ using std::cout;
static
void testBasicOperations() {
std::auto_ptr<ByteBuffer> buff(new ByteBuffer(32));
epics::auto_ptr<ByteBuffer> buff(new ByteBuffer(32));
testOk1(buff->getSize()==32);
@@ -185,7 +185,7 @@ static
void testInverseEndianness(int order, const char *expect) {
testDiag("check byte swapping features order=%d", order);
std::auto_ptr<ByteBuffer> buf(new ByteBuffer(32,order));
epics::auto_ptr<ByteBuffer> buf(new ByteBuffer(32,order));
buf->putShort(0x6162);
buf->putInt(0x63646566);