THRIFT-3622: remove auto_ptr use in the codebase because it is deprecated
Client: C++

This closes #1183
diff --git a/lib/cpp/test/JSONProtoTest.cpp b/lib/cpp/test/JSONProtoTest.cpp
index 2da3044..2ac7adc 100644
--- a/lib/cpp/test/JSONProtoTest.cpp
+++ b/lib/cpp/test/JSONProtoTest.cpp
@@ -23,6 +23,7 @@
 #include <sstream>
 #include <thrift/transport/TBufferTransports.h>
 #include <thrift/protocol/TJSONProtocol.h>
+#include <boost/scoped_ptr.hpp>
 #include "gen-cpp/DebugProtoTest_types.h"
 
 #define BOOST_TEST_MODULE JSONProtoTest
@@ -32,7 +33,7 @@
 using apache::thrift::transport::TMemoryBuffer;
 using apache::thrift::protocol::TJSONProtocol;
 
-static std::auto_ptr<OneOfEach> ooe;
+static boost::scoped_ptr<OneOfEach> ooe;
 
 void testCaseSetup_1() {
   ooe.reset(new OneOfEach);
@@ -65,7 +66,7 @@
     "Expected:\n" << expected_result << "\nGotten:\n" << result);
 }
 
-static std::auto_ptr<Nesting> n;
+static boost::scoped_ptr<Nesting> n;
 
 void testCaseSetup_2() {
   testCaseSetup_1();
@@ -105,7 +106,7 @@
     "Expected:\n" << expected_result << "\nGotten:\n" << result);
 }
 
-static std::auto_ptr<HolyMoley> hm;
+static boost::scoped_ptr<HolyMoley> hm;
 
 void testCaseSetup_3() {
   testCaseSetup_2();