http://git-wip-us.apache.org/repos/asf/thrift/blob/82ae9575/lib/cpp/test/TServerIntegrationTest.cpp
----------------------------------------------------------------------
diff --git a/lib/cpp/test/TServerIntegrationTest.cpp 
b/lib/cpp/test/TServerIntegrationTest.cpp
index fd7bae2..a6e02f1 100644
--- a/lib/cpp/test/TServerIntegrationTest.cpp
+++ b/lib/cpp/test/TServerIntegrationTest.cpp
@@ -20,16 +20,14 @@
 #define BOOST_TEST_MODULE TServerIntegrationTest
 #include <boost/test/auto_unit_test.hpp>
 #include <boost/atomic.hpp>
-#include <boost/bind.hpp>
 #include <boost/date_time/posix_time/ptime.hpp>
 #include <boost/foreach.hpp>
 #include <boost/format.hpp>
-#include <boost/make_shared.hpp>
-#include <boost/shared_ptr.hpp>
 #include <boost/thread.hpp>
 #include <thrift/server/TSimpleServer.h>
 #include <thrift/server/TThreadPoolServer.h>
 #include <thrift/server/TThreadedServer.h>
+#include <thrift/stdcxx.h>
 #include <thrift/protocol/TBinaryProtocol.h>
 #include <thrift/transport/TServerSocket.h>
 #include <thrift/transport/TSocket.h>
@@ -57,6 +55,9 @@ using apache::thrift::server::TServerEventHandler;
 using apache::thrift::server::TSimpleServer;
 using apache::thrift::server::TThreadPoolServer;
 using apache::thrift::server::TThreadedServer;
+using apache::thrift::stdcxx::dynamic_pointer_cast;
+using apache::thrift::stdcxx::make_shared;
+using apache::thrift::stdcxx::shared_ptr;
 using apache::thrift::test::ParentServiceClient;
 using apache::thrift::test::ParentServiceIf;
 using apache::thrift::test::ParentServiceIfFactory;
@@ -79,8 +80,8 @@ public:
     isListening_ = true;
     notify();
   }
-  virtual void* createContext(boost::shared_ptr<TProtocol> input,
-                              boost::shared_ptr<TProtocol> output) {
+  virtual void* createContext(shared_ptr<TProtocol> input,
+                              shared_ptr<TProtocol> output) {
     Synchronized sync(*this);
     ++accepted_;
     notify();
@@ -149,26 +150,26 @@ void autoSocketCloser(TSocket* pSock) {
 template <class TServerType>
 class TServerIntegrationTestFixture {
 public:
-  TServerIntegrationTestFixture(const boost::shared_ptr<TProcessorFactory>& 
_processorFactory)
+  TServerIntegrationTestFixture(const shared_ptr<TProcessorFactory>& 
_processorFactory)
     : pServer(new TServerType(_processorFactory,
-                              boost::shared_ptr<TServerTransport>(
+                              shared_ptr<TServerTransport>(
                                   new TServerSocket("localhost", 0)),
-                              boost::shared_ptr<TTransportFactory>(new 
TTransportFactory),
-                              boost::shared_ptr<TProtocolFactory>(new 
TBinaryProtocolFactory))),
-      pEventHandler(boost::shared_ptr<TServerReadyEventHandler>(new 
TServerReadyEventHandler)),
+                              shared_ptr<TTransportFactory>(new 
TTransportFactory),
+                              shared_ptr<TProtocolFactory>(new 
TBinaryProtocolFactory))),
+      pEventHandler(shared_ptr<TServerReadyEventHandler>(new 
TServerReadyEventHandler)),
     bStressDone(false),
     bStressConnectionCount(0),
     bStressRequestCount(0) {
     pServer->setServerEventHandler(pEventHandler);
   }
 
-  TServerIntegrationTestFixture(const boost::shared_ptr<TProcessor>& 
_processor)
+  TServerIntegrationTestFixture(const shared_ptr<TProcessor>& _processor)
     : pServer(
           new TServerType(_processor,
-                          boost::shared_ptr<TServerTransport>(new 
TServerSocket("localhost", 0)),
-                          boost::shared_ptr<TTransportFactory>(new 
TTransportFactory),
-                          boost::shared_ptr<TProtocolFactory>(new 
TBinaryProtocolFactory))),
-      pEventHandler(boost::shared_ptr<TServerReadyEventHandler>(new 
TServerReadyEventHandler)),
+                          shared_ptr<TServerTransport>(new 
TServerSocket("localhost", 0)),
+                          shared_ptr<TTransportFactory>(new TTransportFactory),
+                          shared_ptr<TProtocolFactory>(new 
TBinaryProtocolFactory))),
+      pEventHandler(shared_ptr<TServerReadyEventHandler>(new 
TServerReadyEventHandler)),
       bStressDone(false),
     bStressConnectionCount(0),
     bStressRequestCount(0) {
@@ -176,7 +177,7 @@ public:
   }
 
   void startServer() {
-    pServerThread.reset(new boost::thread(boost::bind(&TServerType::serve, 
pServer.get())));
+    pServerThread.reset(new 
boost::thread(apache::thrift::stdcxx::bind(&TServerType::serve, 
pServer.get())));
 
     // block until listen() completes so clients will be able to connect
     Synchronized sync(*(pEventHandler.get()));
@@ -222,19 +223,19 @@ public:
 
     startServer();
 
-    std::vector<boost::shared_ptr<TSocket> > holdSockets;
-    std::vector<boost::shared_ptr<boost::thread> > holdThreads;
+    std::vector<shared_ptr<TSocket> > holdSockets;
+    std::vector<shared_ptr<boost::thread> > holdThreads;
 
     for (int64_t i = 0; i < numToMake; ++i) {
-      boost::shared_ptr<TSocket> pClientSock(new TSocket("localhost", 
getServerPort()),
+      shared_ptr<TSocket> pClientSock(new TSocket("localhost", 
getServerPort()),
                                              autoSocketCloser);
       holdSockets.push_back(pClientSock);
-      boost::shared_ptr<TProtocol> pClientProtocol(new 
TBinaryProtocol(pClientSock));
+      shared_ptr<TProtocol> pClientProtocol(new TBinaryProtocol(pClientSock));
       ParentServiceClient client(pClientProtocol);
       pClientSock->open();
       client.incrementGeneration();
-      holdThreads.push_back(boost::shared_ptr<boost::thread>(
-          new 
boost::thread(boost::bind(&TServerIntegrationTestFixture::delayClose,
+      holdThreads.push_back(shared_ptr<boost::thread>(
+          new 
boost::thread(apache::thrift::stdcxx::bind(&TServerIntegrationTestFixture::delayClose,
                                         this,
                                         pClientSock,
                                         milliseconds(10 * numToMake)))));
@@ -242,7 +243,7 @@ public:
 
     BOOST_CHECK_EQUAL(expectedHWM, pServer->getConcurrentClientCountHWM());
 
-    BOOST_FOREACH (boost::shared_ptr<boost::thread> pThread, holdThreads) { 
pThread->join(); }
+    BOOST_FOREACH (shared_ptr<boost::thread> pThread, holdThreads) { 
pThread->join(); }
     holdThreads.clear();
     holdSockets.clear();
 
@@ -254,7 +255,7 @@ public:
    * \param[in]  toClose  the connection to close
    * \param[in]  after  the delay to impose
    */
-  void delayClose(boost::shared_ptr<TTransport> toClose, 
boost::posix_time::time_duration after) {
+  void delayClose(shared_ptr<TTransport> toClose, 
boost::posix_time::time_duration after) {
     boost::this_thread::sleep(after);
     toClose->close();
   }
@@ -279,10 +280,10 @@ public:
 
     startServer();
 
-    std::vector<boost::shared_ptr<boost::thread> > holdThreads;
+    std::vector<shared_ptr<boost::thread> > holdThreads;
     for (int64_t i = 0; i < numToMake; ++i) {
-      holdThreads.push_back(boost::shared_ptr<boost::thread>(
-        new 
boost::thread(boost::bind(&TServerIntegrationTestFixture::stressor, this))));
+      holdThreads.push_back(shared_ptr<boost::thread>(
+        new 
boost::thread(apache::thrift::stdcxx::bind(&TServerIntegrationTestFixture::stressor,
 this))));
     }
 
     boost::this_thread::sleep(duration);
@@ -291,7 +292,7 @@ public:
     BOOST_TEST_MESSAGE(boost::format("  serviced %1% connections (HWM %2%) 
totaling %3% requests")
         % bStressConnectionCount % pServer->getConcurrentClientCountHWM() % 
bStressRequestCount);
 
-    BOOST_FOREACH (boost::shared_ptr<boost::thread> pThread, holdThreads) { 
pThread->join(); }
+    BOOST_FOREACH (shared_ptr<boost::thread> pThread, holdThreads) { 
pThread->join(); }
     holdThreads.clear();
 
     BOOST_CHECK(bStressRequestCount > 0);
@@ -304,8 +305,8 @@ public:
    */
   void stressor() {
   while (!bStressDone) {
-      boost::shared_ptr<TSocket> pSocket(new TSocket("localhost", 
getServerPort()), autoSocketCloser);
-      boost::shared_ptr<TProtocol> pProtocol(new TBinaryProtocol(pSocket));
+      shared_ptr<TSocket> pSocket(new TSocket("localhost", getServerPort()), 
autoSocketCloser);
+      shared_ptr<TProtocol> pProtocol(new TBinaryProtocol(pSocket));
       ParentServiceClient client(pProtocol);
       pSocket->open();
       bStressConnectionCount.fetch_add(1, boost::memory_order_relaxed);
@@ -316,9 +317,9 @@ public:
     }
   }
 
-  boost::shared_ptr<TServerType> pServer;
-  boost::shared_ptr<TServerReadyEventHandler> pEventHandler;
-  boost::shared_ptr<boost::thread> pServerThread;
+  shared_ptr<TServerType> pServer;
+  shared_ptr<TServerReadyEventHandler> pEventHandler;
+  shared_ptr<boost::thread> pServerThread;
   bool bStressDone;
   boost::atomic_int64_t bStressConnectionCount;
   boost::atomic_int64_t bStressRequestCount;
@@ -329,9 +330,9 @@ class TServerIntegrationProcessorFactoryTestFixture
     : public TServerIntegrationTestFixture<TServerType> {
 public:
   TServerIntegrationProcessorFactoryTestFixture()
-    : 
TServerIntegrationTestFixture<TServerType>(boost::make_shared<ParentServiceProcessorFactory>(
-          boost::make_shared<ParentServiceIfSingletonFactory>(
-              boost::make_shared<ParentHandler>()))) {}
+    : 
TServerIntegrationTestFixture<TServerType>(make_shared<ParentServiceProcessorFactory>(
+          make_shared<ParentServiceIfSingletonFactory>(
+              make_shared<ParentHandler>()))) {}
 };
 
 template <class TServerType>
@@ -339,7 +340,7 @@ class TServerIntegrationProcessorTestFixture : public 
TServerIntegrationTestFixt
 public:
   TServerIntegrationProcessorTestFixture()
     : TServerIntegrationTestFixture<TServerType>(
-          
boost::make_shared<ParentServiceProcessor>(boost::make_shared<ParentHandler>()))
 {}
+          make_shared<ParentServiceProcessor>(make_shared<ParentHandler>())) {}
 };
 
 BOOST_AUTO_TEST_SUITE(constructors)
@@ -376,7 +377,7 @@ BOOST_FIXTURE_TEST_CASE(test_threaded_stress,
 BOOST_FIXTURE_TEST_CASE(test_threadpool_factory,
                         
TServerIntegrationProcessorFactoryTestFixture<TThreadPoolServer>) {
   pServer->getThreadManager()->threadFactory(
-      boost::shared_ptr<apache::thrift::concurrency::ThreadFactory>(
+      shared_ptr<apache::thrift::concurrency::ThreadFactory>(
           new apache::thrift::concurrency::PlatformThreadFactory));
   pServer->getThreadManager()->start();
 
@@ -391,7 +392,7 @@ BOOST_FIXTURE_TEST_CASE(test_threadpool_factory,
 BOOST_FIXTURE_TEST_CASE(test_threadpool,
                         
TServerIntegrationProcessorTestFixture<TThreadPoolServer>) {
   pServer->getThreadManager()->threadFactory(
-      boost::shared_ptr<apache::thrift::concurrency::ThreadFactory>(
+      shared_ptr<apache::thrift::concurrency::ThreadFactory>(
           new apache::thrift::concurrency::PlatformThreadFactory));
   pServer->getThreadManager()->start();
 
@@ -406,7 +407,7 @@ BOOST_FIXTURE_TEST_CASE(test_threadpool,
 BOOST_FIXTURE_TEST_CASE(test_threadpool_bound,
                         
TServerIntegrationProcessorTestFixture<TThreadPoolServer>) {
   pServer->getThreadManager()->threadFactory(
-      boost::shared_ptr<apache::thrift::concurrency::ThreadFactory>(
+      shared_ptr<apache::thrift::concurrency::ThreadFactory>(
           new apache::thrift::concurrency::PlatformThreadFactory));
   pServer->getThreadManager()->start();
   pServer->setConcurrentClientLimit(4);
@@ -417,7 +418,7 @@ BOOST_FIXTURE_TEST_CASE(test_threadpool_bound,
 BOOST_FIXTURE_TEST_CASE(test_threadpool_stress,
                         
TServerIntegrationProcessorTestFixture<TThreadPoolServer>) {
   pServer->getThreadManager()->threadFactory(
-      boost::shared_ptr<apache::thrift::concurrency::ThreadFactory>(
+      shared_ptr<apache::thrift::concurrency::ThreadFactory>(
           new apache::thrift::concurrency::PlatformThreadFactory));
   pServer->getThreadManager()->start();
 
@@ -435,11 +436,11 @@ 
BOOST_AUTO_TEST_CASE(test_stop_with_interruptable_clients_connected) {
 
   startServer();
 
-  boost::shared_ptr<TSocket> pClientSock1(new TSocket("localhost", 
getServerPort()),
+  shared_ptr<TSocket> pClientSock1(new TSocket("localhost", getServerPort()),
                                           autoSocketCloser);
   pClientSock1->open();
 
-  boost::shared_ptr<TSocket> pClientSock2(new TSocket("localhost", 
getServerPort()),
+  shared_ptr<TSocket> pClientSock2(new TSocket("localhost", getServerPort()),
                                           autoSocketCloser);
   pClientSock2->open();
 
@@ -461,27 +462,27 @@ 
BOOST_AUTO_TEST_CASE(test_stop_with_uninterruptable_clients_connected) {
   // disconnect.
     BOOST_TEST_MESSAGE("Testing stop with uninterruptable clients");
 
-  boost::dynamic_pointer_cast<TServerSocket>(pServer->getServerTransport())
+  dynamic_pointer_cast<TServerSocket>(pServer->getServerTransport())
       ->setInterruptableChildren(false); // returns to pre-THRIFT-2441 behavior
 
   startServer();
 
-  boost::shared_ptr<TSocket> pClientSock1(new TSocket("localhost", 
getServerPort()),
+  shared_ptr<TSocket> pClientSock1(new TSocket("localhost", getServerPort()),
                                           autoSocketCloser);
   pClientSock1->open();
 
-  boost::shared_ptr<TSocket> pClientSock2(new TSocket("localhost", 
getServerPort()),
+  shared_ptr<TSocket> pClientSock2(new TSocket("localhost", getServerPort()),
                                           autoSocketCloser);
   pClientSock2->open();
 
   // Ensure they have been accepted
   blockUntilAccepted(2);
 
-  boost::thread t1(boost::bind(&TServerIntegrationTestFixture::delayClose,
+  boost::thread 
t1(apache::thrift::stdcxx::bind(&TServerIntegrationTestFixture::delayClose,
                                this,
                                pClientSock1,
                                milliseconds(250)));
-  boost::thread t2(boost::bind(&TServerIntegrationTestFixture::delayClose,
+  boost::thread 
t2(apache::thrift::stdcxx::bind(&TServerIntegrationTestFixture::delayClose,
                                this,
                                pClientSock2,
                                milliseconds(250)));
@@ -502,24 +503,24 @@ BOOST_AUTO_TEST_CASE(test_concurrent_client_limit) {
   BOOST_CHECK_EQUAL(0, pServer->getConcurrentClientCount());
   BOOST_CHECK_EQUAL(2, pServer->getConcurrentClientLimit());
 
-  boost::shared_ptr<TSocket> pClientSock1(new TSocket("localhost", 
getServerPort()),
+  shared_ptr<TSocket> pClientSock1(new TSocket("localhost", getServerPort()),
                                           autoSocketCloser);
   pClientSock1->open();
   blockUntilAccepted(1);
   BOOST_CHECK_EQUAL(1, pServer->getConcurrentClientCount());
 
-  boost::shared_ptr<TSocket> pClientSock2(new TSocket("localhost", 
getServerPort()),
+  shared_ptr<TSocket> pClientSock2(new TSocket("localhost", getServerPort()),
                                           autoSocketCloser);
   pClientSock2->open();
   blockUntilAccepted(2);
   BOOST_CHECK_EQUAL(2, pServer->getConcurrentClientCount());
 
   // a third client cannot connect until one of the other two closes
-  boost::thread t2(boost::bind(&TServerIntegrationTestFixture::delayClose,
+  boost::thread 
t2(apache::thrift::stdcxx::bind(&TServerIntegrationTestFixture::delayClose,
                                this,
                                pClientSock2,
                                milliseconds(250)));
-  boost::shared_ptr<TSocket> pClientSock3(new TSocket("localhost", 
getServerPort()),
+  shared_ptr<TSocket> pClientSock3(new TSocket("localhost", getServerPort()),
                                           autoSocketCloser);
   pClientSock2->open();
   blockUntilAccepted(2);

http://git-wip-us.apache.org/repos/asf/thrift/blob/82ae9575/lib/cpp/test/TServerSocketTest.cpp
----------------------------------------------------------------------
diff --git a/lib/cpp/test/TServerSocketTest.cpp 
b/lib/cpp/test/TServerSocketTest.cpp
index 1da5d36..a191147 100644
--- a/lib/cpp/test/TServerSocketTest.cpp
+++ b/lib/cpp/test/TServerSocketTest.cpp
@@ -20,6 +20,7 @@
 #include <boost/test/auto_unit_test.hpp>
 #include <thrift/transport/TSocket.h>
 #include <thrift/transport/TServerSocket.h>
+#include <thrift/stdcxx.h>
 #include "TTransportCheckThrow.h"
 #include <iostream>
 
@@ -27,6 +28,7 @@ using apache::thrift::transport::TServerSocket;
 using apache::thrift::transport::TSocket;
 using apache::thrift::transport::TTransport;
 using apache::thrift::transport::TTransportException;
+using apache::thrift::stdcxx::shared_ptr;
 
 BOOST_AUTO_TEST_SUITE(TServerSocketTest)
 
@@ -36,7 +38,7 @@ BOOST_AUTO_TEST_CASE(test_bind_to_address) {
   int port = sock1.getPort();
   TSocket clientSock("localhost", port);
   clientSock.open();
-  boost::shared_ptr<TTransport> accepted = sock1.accept();
+  shared_ptr<TTransport> accepted = sock1.accept();
   accepted->close();
   sock1.close();
 

http://git-wip-us.apache.org/repos/asf/thrift/blob/82ae9575/lib/cpp/test/TServerTransportTest.cpp
----------------------------------------------------------------------
diff --git a/lib/cpp/test/TServerTransportTest.cpp 
b/lib/cpp/test/TServerTransportTest.cpp
index a554622..dc6aede 100644
--- a/lib/cpp/test/TServerTransportTest.cpp
+++ b/lib/cpp/test/TServerTransportTest.cpp
@@ -20,10 +20,12 @@
 #include <boost/test/auto_unit_test.hpp>
 #include <thrift/transport/TSocket.h>
 #include <thrift/transport/TServerTransport.h>
+#include <thrift/stdcxx.h>
 
 using apache::thrift::transport::TServerTransport;
 using apache::thrift::transport::TTransport;
 using apache::thrift::transport::TTransportException;
+using apache::thrift::stdcxx::shared_ptr;
 
 BOOST_AUTO_TEST_SUITE(TServerTransportTest)
 
@@ -36,9 +38,9 @@ public:
   bool valid_;
 
 protected:
-  boost::shared_ptr<TTransport> acceptImpl() {
-    return valid_ ? boost::shared_ptr<TestTTransport>(new TestTTransport)
-                  : boost::shared_ptr<TestTTransport>();
+  shared_ptr<TTransport> acceptImpl() {
+    return valid_ ? shared_ptr<TestTTransport>(new TestTTransport)
+                  : shared_ptr<TestTTransport>();
   }
 };
 

http://git-wip-us.apache.org/repos/asf/thrift/blob/82ae9575/lib/cpp/test/TSocketInterruptTest.cpp
----------------------------------------------------------------------
diff --git a/lib/cpp/test/TSocketInterruptTest.cpp 
b/lib/cpp/test/TSocketInterruptTest.cpp
index 27b89eb..3a189cc 100644
--- a/lib/cpp/test/TSocketInterruptTest.cpp
+++ b/lib/cpp/test/TSocketInterruptTest.cpp
@@ -20,26 +20,27 @@
 #define BOOST_TEST_MODULE TSocketInterruptTest
 #include <boost/test/auto_unit_test.hpp>
 
-#include <boost/bind.hpp>
 #include <boost/chrono/duration.hpp>
 #include <boost/date_time/posix_time/posix_time_duration.hpp>
 #include <boost/thread/thread.hpp>
 #include <thrift/transport/TSocket.h>
 #include <thrift/transport/TServerSocket.h>
+#include <thrift/stdcxx.h>
 
 using apache::thrift::transport::TServerSocket;
 using apache::thrift::transport::TSocket;
 using apache::thrift::transport::TTransport;
 using apache::thrift::transport::TTransportException;
+using namespace apache::thrift;
 
 BOOST_AUTO_TEST_SUITE(TSocketInterruptTest)
 
-void readerWorker(boost::shared_ptr<TTransport> tt, uint32_t expectedResult) {
+void readerWorker(stdcxx::shared_ptr<TTransport> tt, uint32_t expectedResult) {
   uint8_t buf[4];
   BOOST_CHECK_EQUAL(expectedResult, tt->read(buf, 4));
 }
 
-void readerWorkerMustThrow(boost::shared_ptr<TTransport> tt) {
+void readerWorkerMustThrow(stdcxx::shared_ptr<TTransport> tt) {
   try {
     uint8_t buf[4];
     tt->read(buf, 4);
@@ -55,8 +56,8 @@ BOOST_AUTO_TEST_CASE(test_interruptable_child_read) {
   int port = sock1.getPort();
   TSocket clientSock("localhost", port);
   clientSock.open();
-  boost::shared_ptr<TTransport> accepted = sock1.accept();
-  boost::thread readThread(boost::bind(readerWorkerMustThrow, accepted));
+  stdcxx::shared_ptr<TTransport> accepted = sock1.accept();
+  boost::thread readThread(stdcxx::bind(readerWorkerMustThrow, accepted));
   boost::this_thread::sleep(boost::posix_time::milliseconds(50));
   // readThread is practically guaranteed to be blocking now
   sock1.interruptChildren();
@@ -74,8 +75,8 @@ BOOST_AUTO_TEST_CASE(test_non_interruptable_child_read) {
   int port = sock1.getPort();
   TSocket clientSock("localhost", port);
   clientSock.open();
-  boost::shared_ptr<TTransport> accepted = sock1.accept();
-  boost::thread readThread(boost::bind(readerWorker, accepted, 0));
+  stdcxx::shared_ptr<TTransport> accepted = sock1.accept();
+  boost::thread readThread(stdcxx::bind(readerWorker, accepted, 0));
   boost::this_thread::sleep(boost::posix_time::milliseconds(50));
   // readThread is practically guaranteed to be blocking here
   sock1.interruptChildren();
@@ -96,7 +97,7 @@ BOOST_AUTO_TEST_CASE(test_cannot_change_after_listen) {
   sock1.close();
 }
 
-void peekerWorker(boost::shared_ptr<TTransport> tt, bool expectedResult) {
+void peekerWorker(stdcxx::shared_ptr<TTransport> tt, bool expectedResult) {
   BOOST_CHECK_EQUAL(expectedResult, tt->peek());
 }
 
@@ -106,9 +107,9 @@ BOOST_AUTO_TEST_CASE(test_interruptable_child_peek) {
   int port = sock1.getPort();
   TSocket clientSock("localhost", port);
   clientSock.open();
-  boost::shared_ptr<TTransport> accepted = sock1.accept();
+  stdcxx::shared_ptr<TTransport> accepted = sock1.accept();
   // peek() will return false if child is interrupted
-  boost::thread peekThread(boost::bind(peekerWorker, accepted, false));
+  boost::thread peekThread(stdcxx::bind(peekerWorker, accepted, false));
   boost::this_thread::sleep(boost::posix_time::milliseconds(50));
   // peekThread is practically guaranteed to be blocking now
   sock1.interruptChildren();
@@ -126,9 +127,9 @@ BOOST_AUTO_TEST_CASE(test_non_interruptable_child_peek) {
   int port = sock1.getPort();
   TSocket clientSock("localhost", port);
   clientSock.open();
-  boost::shared_ptr<TTransport> accepted = sock1.accept();
+  stdcxx::shared_ptr<TTransport> accepted = sock1.accept();
   // peek() will return false when remote side is closed
-  boost::thread peekThread(boost::bind(peekerWorker, accepted, false));
+  boost::thread peekThread(stdcxx::bind(peekerWorker, accepted, false));
   boost::this_thread::sleep(boost::posix_time::milliseconds(50));
   // peekThread is practically guaranteed to be blocking now
   sock1.interruptChildren();

http://git-wip-us.apache.org/repos/asf/thrift/blob/82ae9575/lib/cpp/test/TransportTest.cpp
----------------------------------------------------------------------
diff --git a/lib/cpp/test/TransportTest.cpp b/lib/cpp/test/TransportTest.cpp
index ccef9d5..d6ab457 100644
--- a/lib/cpp/test/TransportTest.cpp
+++ b/lib/cpp/test/TransportTest.cpp
@@ -26,7 +26,7 @@
 #endif
 #include <sstream>
 #include <fstream>
-#include <thrift/cxxfunctional.h>
+#include <thrift/stdcxx.h>
 
 #include <boost/mpl/list.hpp>
 #include <boost/shared_array.hpp>
@@ -43,10 +43,12 @@
 
 #include <thrift/concurrency/FunctionRunner.h>
 #if _WIN32
+#include <thrift/transport/TPipe.h>
 #include <thrift/windows/TWinsockSingleton.h>
 #endif
 
 using namespace apache::thrift::transport;
+using namespace apache::thrift;
 
 static boost::mt19937 rng;
 
@@ -112,7 +114,7 @@ public:
   std::string describe() const { return generator_->describe(); }
 
 private:
-  boost::shared_ptr<SizeGenerator> generator_;
+  stdcxx::shared_ptr<SizeGenerator> generator_;
 };
 
 /**************************************************************************
@@ -135,8 +137,8 @@ public:
 
   CoupledTransports() : in(), out() {}
 
-  boost::shared_ptr<Transport_> in;
-  boost::shared_ptr<Transport_> out;
+  stdcxx::shared_ptr<Transport_> in;
+  stdcxx::shared_ptr<Transport_> out;
 
 private:
   CoupledTransports(const CoupledTransports&);
@@ -153,7 +155,7 @@ public:
     out = buf;
   }
 
-  boost::shared_ptr<TMemoryBuffer> buf;
+  stdcxx::shared_ptr<TMemoryBuffer> buf;
 };
 
 /**
@@ -219,6 +221,22 @@ public:
     out.reset(new TFDTransport(pipes[1], TFDTransport::CLOSE_ON_DESTROY));
   }
 };
+#else
+/**
+ * Coupled pipe transports
+ */
+class CoupledPipeTransports : public CoupledTransports<TPipe> {
+public:
+  HANDLE hRead;
+  HANDLE hWrite;
+
+  CoupledPipeTransports() {
+    BOOST_REQUIRE(CreatePipe(&hRead, &hWrite, NULL, 1048576 * 2));
+    in.reset(new TPipe(hRead, hWrite));
+    in->open();
+    out = in;
+  }
+};
 #endif
 
 /**
@@ -323,11 +341,11 @@ public:
  **************************************************************************/
 
 struct TriggerInfo {
-  TriggerInfo(int seconds, const boost::shared_ptr<TTransport>& transport, 
uint32_t writeLength)
+  TriggerInfo(int seconds, const stdcxx::shared_ptr<TTransport>& transport, 
uint32_t writeLength)
     : timeoutSeconds(seconds), transport(transport), writeLength(writeLength), 
next(NULL) {}
 
   int timeoutSeconds;
-  boost::shared_ptr<TTransport> transport;
+  stdcxx::shared_ptr<TTransport> transport;
   uint32_t writeLength;
   TriggerInfo* next;
 };
@@ -402,7 +420,7 @@ void alarm_handler_wrapper() {
  * to the end.)
  */
 void add_trigger(unsigned int seconds,
-                 const boost::shared_ptr<TTransport>& transport,
+                 const stdcxx::shared_ptr<TTransport>& transport,
                  uint32_t write_len) {
   TriggerInfo* info = new TriggerInfo(seconds, transport, write_len);
   {
@@ -442,7 +460,7 @@ void clear_triggers() {
 }
 
 void set_trigger(unsigned int seconds,
-                 const boost::shared_ptr<TTransport>& transport,
+                 const stdcxx::shared_ptr<TTransport>& transport,
                  uint32_t write_len) {
   clear_triggers();
   add_trigger(seconds, transport, write_len);
@@ -840,6 +858,19 @@ public:
     TEST_RW(CoupledFDTransports, 1024 * 16, 1, 1, rand4k, rand4k, 
fd_max_outstanding);
 
     TEST_BLOCKING_BEHAVIOR(CoupledFDTransports);
+#else
+    // TPipe tests (WIN32 only)
+    TEST_RW(CoupledPipeTransports, 1024 * 1024, 0, 0);
+    TEST_RW(CoupledPipeTransports, 1024 * 256, rand4k, rand4k);
+    TEST_RW(CoupledPipeTransports, 1024 * 256, 167, 163);
+    TEST_RW(CoupledPipeTransports, 1024 * 16, 1, 1);
+
+    TEST_RW(CoupledPipeTransports, 1024 * 256, 0, 0, rand4k, rand4k);
+    TEST_RW(CoupledPipeTransports, 1024 * 256, rand4k, rand4k, rand4k, rand4k);
+    TEST_RW(CoupledPipeTransports, 1024 * 256, 167, 163, rand4k, rand4k);
+    TEST_RW(CoupledPipeTransports, 1024 * 16, 1, 1, rand4k, rand4k);
+
+    TEST_BLOCKING_BEHAVIOR(CoupledPipeTransports);
 #endif //_WIN32
 
     // TSocket tests
@@ -945,11 +976,11 @@ private:
          << rChunkSizeGen.describe() << ", " << maxOutstanding << ")";
 
 #if (BOOST_VERSION >= 105900)
-    boost::function<void ()> test_func
+    stdcxx::function<void ()> test_func
 #else
     boost::unit_test::callback0<> test_func
 #endif
-        = apache::thrift::stdcxx::bind(test_rw<CoupledTransports>,
+        = stdcxx::bind(test_rw<CoupledTransports>,
                                        totalSize,
                                        wSizeGen,
                                        rSizeGen,
@@ -995,7 +1026,7 @@ private:
  **************************************************************************/
 
 struct global_fixture {
-  boost::shared_ptr<apache::thrift::concurrency::Thread> alarmThread_;
+  stdcxx::shared_ptr<apache::thrift::concurrency::Thread> alarmThread_;
   global_fixture() {
 #if _WIN32
     apache::thrift::transport::TWinsockSingleton::create();

http://git-wip-us.apache.org/repos/asf/thrift/blob/82ae9575/lib/cpp/test/ZlibTest.cpp
----------------------------------------------------------------------
diff --git a/lib/cpp/test/ZlibTest.cpp b/lib/cpp/test/ZlibTest.cpp
index 25db4b8..a4479eb 100644
--- a/lib/cpp/test/ZlibTest.cpp
+++ b/lib/cpp/test/ZlibTest.cpp
@@ -36,9 +36,8 @@
 #include <cstddef>
 #include <fstream>
 #include <iostream>
-#include <thrift/cxxfunctional.h>
+#include <thrift/stdcxx.h>
 
-#include <boost/function.hpp>
 #include <boost/random.hpp>
 #include <boost/shared_array.hpp>
 #include <boost/test/unit_test.hpp>
@@ -47,8 +46,9 @@
 #include <thrift/transport/TBufferTransports.h>
 #include <thrift/transport/TZlibTransport.h>
 
-using namespace std;
 using namespace apache::thrift::transport;
+using apache::thrift::stdcxx::shared_ptr;
+using std::string;
 
 boost::mt19937 rng;
 
@@ -147,8 +147,8 @@ boost::shared_array<uint8_t> gen_random_buffer(uint32_t 
buf_len) {
  */
 
 void test_write_then_read(const boost::shared_array<uint8_t> buf, uint32_t 
buf_len) {
-  boost::shared_ptr<TMemoryBuffer> membuf(new TMemoryBuffer());
-  boost::shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf));
+  shared_ptr<TMemoryBuffer> membuf(new TMemoryBuffer());
+  shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf));
   zlib_trans->write(buf.get(), buf_len);
   zlib_trans->finish();
 
@@ -166,8 +166,8 @@ void test_separate_checksum(const 
boost::shared_array<uint8_t> buf, uint32_t buf
   // it isn't there.  The original implementation complained that
   // the stream was not complete.  I'm about to go fix that.
   // It worked.  Awesome.
-  boost::shared_ptr<TMemoryBuffer> membuf(new TMemoryBuffer());
-  boost::shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf));
+  shared_ptr<TMemoryBuffer> membuf(new TMemoryBuffer());
+  shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf));
   zlib_trans->write(buf.get(), buf_len);
   zlib_trans->finish();
   string tmp_buf;
@@ -186,8 +186,8 @@ void test_separate_checksum(const 
boost::shared_array<uint8_t> buf, uint32_t buf
 void test_incomplete_checksum(const boost::shared_array<uint8_t> buf, uint32_t 
buf_len) {
   // Make sure we still get that "not complete" error if
   // it really isn't complete.
-  boost::shared_ptr<TMemoryBuffer> membuf(new TMemoryBuffer());
-  boost::shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf));
+  shared_ptr<TMemoryBuffer> membuf(new TMemoryBuffer());
+  shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf));
   zlib_trans->write(buf.get(), buf_len);
   zlib_trans->finish();
   string tmp_buf;
@@ -210,11 +210,11 @@ void test_incomplete_checksum(const 
boost::shared_array<uint8_t> buf, uint32_t b
 
 void test_read_write_mix(const boost::shared_array<uint8_t> buf,
                          uint32_t buf_len,
-                         const boost::shared_ptr<SizeGenerator>& write_gen,
-                         const boost::shared_ptr<SizeGenerator>& read_gen) {
+                         const shared_ptr<SizeGenerator>& write_gen,
+                         const shared_ptr<SizeGenerator>& read_gen) {
   // Try it with a mix of read/write sizes.
-  boost::shared_ptr<TMemoryBuffer> membuf(new TMemoryBuffer());
-  boost::shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf));
+  shared_ptr<TMemoryBuffer> membuf(new TMemoryBuffer());
+  shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf));
   unsigned int tot;
 
   tot = 0;
@@ -249,8 +249,8 @@ void test_read_write_mix(const boost::shared_array<uint8_t> 
buf,
 
 void test_invalid_checksum(const boost::shared_array<uint8_t> buf, uint32_t 
buf_len) {
   // Verify checksum checking.
-  boost::shared_ptr<TMemoryBuffer> membuf(new TMemoryBuffer());
-  boost::shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf));
+  shared_ptr<TMemoryBuffer> membuf(new TMemoryBuffer());
+  shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf));
   zlib_trans->write(buf.get(), buf_len);
   zlib_trans->finish();
   string tmp_buf;
@@ -286,8 +286,8 @@ void test_invalid_checksum(const 
boost::shared_array<uint8_t> buf, uint32_t buf_
 
 void test_write_after_flush(const boost::shared_array<uint8_t> buf, uint32_t 
buf_len) {
   // write some data
-  boost::shared_ptr<TMemoryBuffer> membuf(new TMemoryBuffer());
-  boost::shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf));
+  shared_ptr<TMemoryBuffer> membuf(new TMemoryBuffer());
+  shared_ptr<TZlibTransport> zlib_trans(new TZlibTransport(membuf));
   zlib_trans->write(buf.get(), buf_len);
 
   // call finish()
@@ -322,7 +322,7 @@ void test_write_after_flush(const 
boost::shared_array<uint8_t> buf, uint32_t buf
 void test_no_write() {
   // Verify that no data is written to the underlying transport if we
   // never write data to the TZlibTransport.
-  boost::shared_ptr<TMemoryBuffer> membuf(new TMemoryBuffer());
+  shared_ptr<TMemoryBuffer> membuf(new TMemoryBuffer());
   {
     // Create a TZlibTransport object, and immediately destroy it
     // when it goes out of scope.
@@ -341,7 +341,8 @@ void test_no_write() {
   do {                                                                         
                    \
     ::std::ostringstream name_ss;                                              
                    \
     name_ss << name << "-" << BOOST_STRINGIZE(_FUNC);                          
                    \
-    boost::function<void ()> test_func = ::apache::thrift::stdcxx::bind(_FUNC, 
##__VA_ARGS__);     \
+    ::apache::thrift::stdcxx::function<void ()> test_func =                    
                    \
+        ::apache::thrift::stdcxx::bind(_FUNC, ##__VA_ARGS__);                  
                    \
     ::boost::unit_test::test_case* tc                                          
                    \
         = ::boost::unit_test::make_test_case(test_func, name_ss.str(), 
__FILE__, __LINE__);        \
     (suite)->add(tc);                                                          
                    \
@@ -369,8 +370,8 @@ void add_tests(boost::unit_test::test_suite* suite,
   ADD_TEST_CASE(suite, name, test_invalid_checksum, buf, buf_len);
   ADD_TEST_CASE(suite, name, test_write_after_flush, buf, buf_len);
 
-  boost::shared_ptr<SizeGenerator> size_32k(new ConstantSizeGenerator(1 << 
15));
-  boost::shared_ptr<SizeGenerator> size_lognormal(new 
LogNormalSizeGenerator(20, 30));
+  shared_ptr<SizeGenerator> size_32k(new ConstantSizeGenerator(1 << 15));
+  shared_ptr<SizeGenerator> size_lognormal(new LogNormalSizeGenerator(20, 30));
   ADD_TEST_CASE(suite, name << "-constant", test_read_write_mix, buf, buf_len, 
size_32k, size_32k);
   ADD_TEST_CASE(suite,
                 name << "-lognormal-write",
@@ -400,8 +401,8 @@ void add_tests(boost::unit_test::test_suite* suite,
   // Because the SizeGenerator makes a copy of the random number generator,
   // both SizeGenerators should return the exact same set of values, since they
   // both start with random number generators in the same state.
-  boost::shared_ptr<SizeGenerator> write_size_gen(new 
LogNormalSizeGenerator(20, 30));
-  boost::shared_ptr<SizeGenerator> read_size_gen(new 
LogNormalSizeGenerator(20, 30));
+  shared_ptr<SizeGenerator> write_size_gen(new LogNormalSizeGenerator(20, 30));
+  shared_ptr<SizeGenerator> read_size_gen(new LogNormalSizeGenerator(20, 30));
   ADD_TEST_CASE(suite,
                 name << "-lognormal-same-distribution",
                 test_read_write_mix,

http://git-wip-us.apache.org/repos/asf/thrift/blob/82ae9575/lib/cpp/test/concurrency/RWMutexStarveTest.cpp
----------------------------------------------------------------------
diff --git a/lib/cpp/test/concurrency/RWMutexStarveTest.cpp 
b/lib/cpp/test/concurrency/RWMutexStarveTest.cpp
index 63d780f..849e078 100644
--- a/lib/cpp/test/concurrency/RWMutexStarveTest.cpp
+++ b/lib/cpp/test/concurrency/RWMutexStarveTest.cpp
@@ -19,22 +19,21 @@
 
 // This is linked into the UnitTests test executable
 
-#include <boost/shared_ptr.hpp>
 #include <boost/test/unit_test.hpp>
 
 #include "thrift/concurrency/Mutex.h"
 #include "thrift/concurrency/PosixThreadFactory.h"
+#include <thrift/stdcxx.h>
 
-using boost::shared_ptr;
+using apache::thrift::stdcxx::shared_ptr;
 using boost::unit_test::test_suite;
 using boost::unit_test::framework::master_test_suite;
 
 using namespace apache::thrift::concurrency;
-using namespace std;
 
 class Locker : public Runnable {
 protected:
-  Locker(boost::shared_ptr<ReadWriteMutex> rwlock, bool writer)
+  Locker(shared_ptr<ReadWriteMutex> rwlock, bool writer)
     : rwlock_(rwlock), writer_(writer), started_(false), gotLock_(false), 
signaled_(false) {}
 
 public:
@@ -57,7 +56,7 @@ public:
   void signal() { signaled_ = true; }
 
 protected:
-  boost::shared_ptr<ReadWriteMutex> rwlock_;
+  shared_ptr<ReadWriteMutex> rwlock_;
   bool writer_;
   volatile bool started_;
   volatile bool gotLock_;
@@ -66,12 +65,12 @@ protected:
 
 class Reader : public Locker {
 public:
-  Reader(boost::shared_ptr<ReadWriteMutex> rwlock) : Locker(rwlock, false) {}
+  Reader(shared_ptr<ReadWriteMutex> rwlock) : Locker(rwlock, false) {}
 };
 
 class Writer : public Locker {
 public:
-  Writer(boost::shared_ptr<ReadWriteMutex> rwlock) : Locker(rwlock, true) {}
+  Writer(shared_ptr<ReadWriteMutex> rwlock) : Locker(rwlock, true) {}
 };
 
 void test_starve(PosixThreadFactory::POLICY policy) {
@@ -81,15 +80,15 @@ void test_starve(PosixThreadFactory::POLICY policy) {
   PosixThreadFactory factory(policy);
   factory.setDetached(false);
 
-  boost::shared_ptr<ReadWriteMutex> rwlock(new NoStarveReadWriteMutex());
+  shared_ptr<ReadWriteMutex> rwlock(new NoStarveReadWriteMutex());
 
-  boost::shared_ptr<Reader> reader1(new Reader(rwlock));
-  boost::shared_ptr<Reader> reader2(new Reader(rwlock));
-  boost::shared_ptr<Writer> writer(new Writer(rwlock));
+  shared_ptr<Reader> reader1(new Reader(rwlock));
+  shared_ptr<Reader> reader2(new Reader(rwlock));
+  shared_ptr<Writer> writer(new Writer(rwlock));
 
-  boost::shared_ptr<Thread> treader1 = factory.newThread(reader1);
-  boost::shared_ptr<Thread> treader2 = factory.newThread(reader2);
-  boost::shared_ptr<Thread> twriter = factory.newThread(writer);
+  shared_ptr<Thread> treader1 = factory.newThread(reader1);
+  shared_ptr<Thread> treader2 = factory.newThread(reader2);
+  shared_ptr<Thread> twriter = factory.newThread(writer);
 
   // launch a reader and make sure he has the lock
   treader1->start();

http://git-wip-us.apache.org/repos/asf/thrift/blob/82ae9575/lib/cpp/test/concurrency/ThreadFactoryTests.h
----------------------------------------------------------------------
diff --git a/lib/cpp/test/concurrency/ThreadFactoryTests.h 
b/lib/cpp/test/concurrency/ThreadFactoryTests.h
index 4fc688c..bd6ed32 100644
--- a/lib/cpp/test/concurrency/ThreadFactoryTests.h
+++ b/lib/cpp/test/concurrency/ThreadFactoryTests.h
@@ -32,7 +32,7 @@ namespace thrift {
 namespace concurrency {
 namespace test {
 
-using boost::shared_ptr;
+using stdcxx::shared_ptr;
 using namespace apache::thrift::concurrency;
 
 /**

http://git-wip-us.apache.org/repos/asf/thrift/blob/82ae9575/lib/cpp/test/concurrency/ThreadManagerTests.h
----------------------------------------------------------------------
diff --git a/lib/cpp/test/concurrency/ThreadManagerTests.h 
b/lib/cpp/test/concurrency/ThreadManagerTests.h
index b5925ac..c07a21b 100644
--- a/lib/cpp/test/concurrency/ThreadManagerTests.h
+++ b/lib/cpp/test/concurrency/ThreadManagerTests.h
@@ -36,8 +36,8 @@ namespace test {
 
 using namespace apache::thrift::concurrency;
 
-static std::deque<boost::shared_ptr<Runnable> > m_expired;
-static void expiredNotifier(boost::shared_ptr<Runnable> runnable)
+static std::deque<stdcxx::shared_ptr<Runnable> > m_expired;
+static void expiredNotifier(stdcxx::shared_ptr<Runnable> runnable)
 {
   m_expired.push_back(runnable);
 }

http://git-wip-us.apache.org/repos/asf/thrift/blob/82ae9575/lib/cpp/test/processor/EventLog.cpp
----------------------------------------------------------------------
diff --git a/lib/cpp/test/processor/EventLog.cpp 
b/lib/cpp/test/processor/EventLog.cpp
index 360307a..e3ddbcc 100644
--- a/lib/cpp/test/processor/EventLog.cpp
+++ b/lib/cpp/test/processor/EventLog.cpp
@@ -21,7 +21,6 @@
 #include <stdarg.h>
 #include <stdlib.h>
 
-using namespace std;
 using namespace apache::thrift::concurrency;
 
 namespace {
@@ -82,7 +81,7 @@ EventLog::EventLog() {
 void EventLog::append(EventType type,
                       uint32_t connectionId,
                       uint32_t callId,
-                      const string& message) {
+                      const std::string& message) {
   Synchronized s(monitor_);
   debug("%d <-- %u, %u, %s \"%s\"", id_, connectionId, callId, type, 
message.c_str());
 

http://git-wip-us.apache.org/repos/asf/thrift/blob/82ae9575/lib/cpp/test/processor/Handlers.h
----------------------------------------------------------------------
diff --git a/lib/cpp/test/processor/Handlers.h 
b/lib/cpp/test/processor/Handlers.h
index 041fd3d..ad47229 100644
--- a/lib/cpp/test/processor/Handlers.h
+++ b/lib/cpp/test/processor/Handlers.h
@@ -29,7 +29,7 @@ namespace test {
 
 class ParentHandler : virtual public ParentServiceIf {
 public:
-  ParentHandler(const boost::shared_ptr<EventLog>& log)
+  ParentHandler(const stdcxx::shared_ptr<EventLog>& log)
     : triggerMonitor(&mutex_), generation_(0), wait_(false), log_(log) {}
 
   int32_t incrementGeneration() {
@@ -136,7 +136,7 @@ protected:
   int32_t generation_;
   bool wait_;
   std::vector<std::string> strings_;
-  boost::shared_ptr<EventLog> log_;
+  stdcxx::shared_ptr<EventLog> log_;
 };
 
 #ifdef _WIN32
@@ -146,7 +146,7 @@ protected:
 
 class ChildHandler : public ParentHandler, virtual public ChildServiceIf {
 public:
-  ChildHandler(const boost::shared_ptr<EventLog>& log) : ParentHandler(log), 
value_(0) {}
+  ChildHandler(const stdcxx::shared_ptr<EventLog>& log) : ParentHandler(log), 
value_(0) {}
 
   int32_t setValue(const int32_t value) {
     concurrency::Guard g(mutex_);
@@ -174,13 +174,13 @@ protected:
 
 struct ConnContext {
 public:
-  ConnContext(boost::shared_ptr<protocol::TProtocol> in,
-              boost::shared_ptr<protocol::TProtocol> out,
+  ConnContext(stdcxx::shared_ptr<protocol::TProtocol> in,
+              stdcxx::shared_ptr<protocol::TProtocol> out,
               uint32_t id)
     : input(in), output(out), id(id) {}
 
-  boost::shared_ptr<protocol::TProtocol> input;
-  boost::shared_ptr<protocol::TProtocol> output;
+  stdcxx::shared_ptr<protocol::TProtocol> input;
+  stdcxx::shared_ptr<protocol::TProtocol> output;
   uint32_t id;
 };
 
@@ -196,12 +196,12 @@ public:
 
 class ServerEventHandler : public server::TServerEventHandler {
 public:
-  ServerEventHandler(const boost::shared_ptr<EventLog>& log) : nextId_(1), 
log_(log) {}
+  ServerEventHandler(const stdcxx::shared_ptr<EventLog>& log) : nextId_(1), 
log_(log) {}
 
   virtual void preServe() {}
 
-  virtual void* createContext(boost::shared_ptr<protocol::TProtocol> input,
-                              boost::shared_ptr<protocol::TProtocol> output) {
+  virtual void* createContext(stdcxx::shared_ptr<protocol::TProtocol> input,
+                              stdcxx::shared_ptr<protocol::TProtocol> output) {
     ConnContext* context = new ConnContext(input, output, nextId_);
     ++nextId_;
     log_->append(EventLog::ET_CONN_CREATED, context->id, 0);
@@ -209,8 +209,8 @@ public:
   }
 
   virtual void deleteContext(void* serverContext,
-                             boost::shared_ptr<protocol::TProtocol> input,
-                             boost::shared_ptr<protocol::TProtocol> output) {
+                             stdcxx::shared_ptr<protocol::TProtocol> input,
+                             stdcxx::shared_ptr<protocol::TProtocol> output) {
     ConnContext* context = reinterpret_cast<ConnContext*>(serverContext);
 
     if (input != context->input) {
@@ -226,7 +226,7 @@ public:
   }
 
   virtual void processContext(void* serverContext,
-                              boost::shared_ptr<transport::TTransport> 
transport) {
+                              stdcxx::shared_ptr<transport::TTransport> 
transport) {
 // TODO: We currently don't test the behavior of the processContext()
 // calls.  The various server implementations call processContext() at
 // slightly different times, and it is too annoying to try and account for
@@ -251,12 +251,12 @@ public:
 
 protected:
   uint32_t nextId_;
-  boost::shared_ptr<EventLog> log_;
+  stdcxx::shared_ptr<EventLog> log_;
 };
 
 class ProcessorEventHandler : public TProcessorEventHandler {
 public:
-  ProcessorEventHandler(const boost::shared_ptr<EventLog>& log) : nextId_(1), 
log_(log) {}
+  ProcessorEventHandler(const stdcxx::shared_ptr<EventLog>& log) : nextId_(1), 
log_(log) {}
 
   void* getContext(const char* fnName, void* serverContext) {
     ConnContext* connContext = reinterpret_cast<ConnContext*>(serverContext);
@@ -329,7 +329,7 @@ protected:
   }
 
   uint32_t nextId_;
-  boost::shared_ptr<EventLog> log_;
+  stdcxx::shared_ptr<EventLog> log_;
 };
 }
 }

http://git-wip-us.apache.org/repos/asf/thrift/blob/82ae9575/lib/cpp/test/processor/ProcessorTest.cpp
----------------------------------------------------------------------
diff --git a/lib/cpp/test/processor/ProcessorTest.cpp 
b/lib/cpp/test/processor/ProcessorTest.cpp
index 486b8cf..c9e186f 100644
--- a/lib/cpp/test/processor/ProcessorTest.cpp
+++ b/lib/cpp/test/processor/ProcessorTest.cpp
@@ -40,15 +40,14 @@
 #include "Handlers.h"
 #include "gen-cpp/ChildService.h"
 
-using namespace std;
-using namespace boost;
 using namespace apache::thrift;
 using namespace apache::thrift::concurrency;
 using namespace apache::thrift::protocol;
 using namespace apache::thrift::server;
-using namespace apache::thrift::transport;
-
 using namespace apache::thrift::test;
+using namespace apache::thrift::transport;
+using std::string;
+using std::vector;
 
 /*
  * Traits classes that encapsulate how to create various types of servers.
@@ -58,13 +57,13 @@ class TSimpleServerTraits {
 public:
   typedef TSimpleServer ServerType;
 
-  boost::shared_ptr<TSimpleServer> createServer(
-      const boost::shared_ptr<TProcessor>& processor,
+  stdcxx::shared_ptr<TSimpleServer> createServer(
+      const stdcxx::shared_ptr<TProcessor>& processor,
       uint16_t port,
-      const boost::shared_ptr<TTransportFactory>& transportFactory,
-      const boost::shared_ptr<TProtocolFactory>& protocolFactory) {
-    boost::shared_ptr<TServerSocket> socket(new TServerSocket(port));
-    return boost::shared_ptr<TSimpleServer>(
+      const stdcxx::shared_ptr<TTransportFactory>& transportFactory,
+      const stdcxx::shared_ptr<TProtocolFactory>& protocolFactory) {
+    stdcxx::shared_ptr<TServerSocket> socket(new TServerSocket(port));
+    return stdcxx::shared_ptr<TSimpleServer>(
         new TSimpleServer(processor, socket, transportFactory, 
protocolFactory));
   }
 };
@@ -73,13 +72,13 @@ class TThreadedServerTraits {
 public:
   typedef TThreadedServer ServerType;
 
-  boost::shared_ptr<TThreadedServer> createServer(
-      const boost::shared_ptr<TProcessor>& processor,
+  stdcxx::shared_ptr<TThreadedServer> createServer(
+      const stdcxx::shared_ptr<TProcessor>& processor,
       uint16_t port,
-      const boost::shared_ptr<TTransportFactory>& transportFactory,
-      const boost::shared_ptr<TProtocolFactory>& protocolFactory) {
-    boost::shared_ptr<TServerSocket> socket(new TServerSocket(port));
-    return boost::shared_ptr<TThreadedServer>(
+      const stdcxx::shared_ptr<TTransportFactory>& transportFactory,
+      const stdcxx::shared_ptr<TProtocolFactory>& protocolFactory) {
+    stdcxx::shared_ptr<TServerSocket> socket(new TServerSocket(port));
+    return stdcxx::shared_ptr<TThreadedServer>(
         new TThreadedServer(processor, socket, transportFactory, 
protocolFactory));
   }
 };
@@ -88,19 +87,19 @@ class TThreadPoolServerTraits {
 public:
   typedef TThreadPoolServer ServerType;
 
-  boost::shared_ptr<TThreadPoolServer> createServer(
-      const boost::shared_ptr<TProcessor>& processor,
+  stdcxx::shared_ptr<TThreadPoolServer> createServer(
+      const stdcxx::shared_ptr<TProcessor>& processor,
       uint16_t port,
-      const boost::shared_ptr<TTransportFactory>& transportFactory,
-      const boost::shared_ptr<TProtocolFactory>& protocolFactory) {
-    boost::shared_ptr<TServerSocket> socket(new TServerSocket(port));
+      const stdcxx::shared_ptr<TTransportFactory>& transportFactory,
+      const stdcxx::shared_ptr<TProtocolFactory>& protocolFactory) {
+    stdcxx::shared_ptr<TServerSocket> socket(new TServerSocket(port));
 
-    boost::shared_ptr<PlatformThreadFactory> threadFactory(new 
PlatformThreadFactory);
-    boost::shared_ptr<ThreadManager> threadManager = 
ThreadManager::newSimpleThreadManager(8);
+    stdcxx::shared_ptr<PlatformThreadFactory> threadFactory(new 
PlatformThreadFactory);
+    stdcxx::shared_ptr<ThreadManager> threadManager = 
ThreadManager::newSimpleThreadManager(8);
     threadManager->threadFactory(threadFactory);
     threadManager->start();
 
-    return boost::shared_ptr<TThreadPoolServer>(
+    return stdcxx::shared_ptr<TThreadPoolServer>(
         new TThreadPoolServer(processor, socket, transportFactory, 
protocolFactory, threadManager));
   }
 };
@@ -109,11 +108,11 @@ class TNonblockingServerTraits {
 public:
   typedef TNonblockingServer ServerType;
 
-  boost::shared_ptr<TNonblockingServer> createServer(
-      const boost::shared_ptr<TProcessor>& processor,
+  stdcxx::shared_ptr<TNonblockingServer> createServer(
+      const stdcxx::shared_ptr<TProcessor>& processor,
       uint16_t port,
-      const boost::shared_ptr<TTransportFactory>& transportFactory,
-      const boost::shared_ptr<TProtocolFactory>& protocolFactory) {
+      const stdcxx::shared_ptr<TTransportFactory>& transportFactory,
+      const stdcxx::shared_ptr<TProtocolFactory>& protocolFactory) {
     // TNonblockingServer automatically uses TFramedTransport.
     // Raise an exception if the supplied transport factory is not a
     // TFramedTransportFactory
@@ -122,13 +121,14 @@ public:
     if (framedFactory == NULL) {
       throw TException("TNonblockingServer must use TFramedTransport");
     }
-    boost::shared_ptr<TNonblockingServerSocket> socket(new 
TNonblockingServerSocket(port));
-    boost::shared_ptr<PlatformThreadFactory> threadFactory(new 
PlatformThreadFactory);
-    boost::shared_ptr<ThreadManager> threadManager = 
ThreadManager::newSimpleThreadManager(8);
+
+    stdcxx::shared_ptr<TNonblockingServerSocket> socket(new 
TNonblockingServerSocket(port));
+    stdcxx::shared_ptr<PlatformThreadFactory> threadFactory(new 
PlatformThreadFactory);
+    stdcxx::shared_ptr<ThreadManager> threadManager = 
ThreadManager::newSimpleThreadManager(8);
     threadManager->threadFactory(threadFactory);
     threadManager->start();
 
-    return boost::shared_ptr<TNonblockingServer>(
+    return stdcxx::shared_ptr<TNonblockingServer>(
         new TNonblockingServer(processor, protocolFactory, socket, 
threadManager));
   }
 };
@@ -137,11 +137,11 @@ class TNonblockingServerNoThreadsTraits {
 public:
   typedef TNonblockingServer ServerType;
 
-  boost::shared_ptr<TNonblockingServer> createServer(
-      const boost::shared_ptr<TProcessor>& processor,
+  stdcxx::shared_ptr<TNonblockingServer> createServer(
+      const stdcxx::shared_ptr<TProcessor>& processor,
       uint16_t port,
-      const boost::shared_ptr<TTransportFactory>& transportFactory,
-      const boost::shared_ptr<TProtocolFactory>& protocolFactory) {
+      const stdcxx::shared_ptr<TTransportFactory>& transportFactory,
+      const stdcxx::shared_ptr<TProtocolFactory>& protocolFactory) {
     // TNonblockingServer automatically uses TFramedTransport.
     // Raise an exception if the supplied transport factory is not a
     // TFramedTransportFactory
@@ -151,10 +151,10 @@ public:
       throw TException("TNonblockingServer must use TFramedTransport");
     }
 
-    boost::shared_ptr<TNonblockingServerSocket> socket(new 
TNonblockingServerSocket(port));
+    stdcxx::shared_ptr<TNonblockingServerSocket> socket(new 
TNonblockingServerSocket(port));
     // Use a NULL ThreadManager
-    boost::shared_ptr<ThreadManager> threadManager;
-    return boost::shared_ptr<TNonblockingServer>(
+    stdcxx::shared_ptr<ThreadManager> threadManager;
+    return stdcxx::shared_ptr<TNonblockingServer>(
         new TNonblockingServer(processor, protocolFactory, socket, 
threadManager));
   }
 };
@@ -244,48 +244,48 @@ public:
     processor_->setEventHandler(processorEventHandler_);
   }
 
-  boost::shared_ptr<TServer> createServer(uint16_t port) {
+  stdcxx::shared_ptr<TServer> createServer(uint16_t port) {
     ServerTraits_ serverTraits;
     return serverTraits.createServer(processor_, port, transportFactory_, 
protocolFactory_);
   }
 
-  boost::shared_ptr<TServerEventHandler> getServerEventHandler() { return 
serverEventHandler_; }
+  stdcxx::shared_ptr<TServerEventHandler> getServerEventHandler() { return 
serverEventHandler_; }
 
   void bindSuccessful(uint16_t port) { port_ = port; }
 
   uint16_t getPort() const { return port_; }
 
-  const boost::shared_ptr<EventLog>& getLog() const { return log_; }
+  const stdcxx::shared_ptr<EventLog>& getLog() const { return log_; }
 
-  const boost::shared_ptr<Handler>& getHandler() const { return handler_; }
+  const stdcxx::shared_ptr<Handler>& getHandler() const { return handler_; }
 
-  boost::shared_ptr<Client> createClient() {
+  stdcxx::shared_ptr<Client> createClient() {
     typedef typename ServiceTraits_::Protocol Protocol;
 
-    boost::shared_ptr<TSocket> socket(new TSocket("127.0.0.1", port_));
-    boost::shared_ptr<Transport_> transport(new Transport_(socket));
-    boost::shared_ptr<Protocol> protocol(new Protocol(transport));
+    stdcxx::shared_ptr<TSocket> socket(new TSocket("127.0.0.1", port_));
+    stdcxx::shared_ptr<Transport_> transport(new Transport_(socket));
+    stdcxx::shared_ptr<Protocol> protocol(new Protocol(transport));
     transport->open();
 
-    boost::shared_ptr<Client> client(new Client(protocol));
+    stdcxx::shared_ptr<Client> client(new Client(protocol));
     return client;
   }
 
 private:
   uint16_t port_;
-  boost::shared_ptr<EventLog> log_;
-  boost::shared_ptr<Handler> handler_;
-  boost::shared_ptr<Processor> processor_;
-  boost::shared_ptr<TTransportFactory> transportFactory_;
-  boost::shared_ptr<TProtocolFactory> protocolFactory_;
-  boost::shared_ptr<TServerEventHandler> serverEventHandler_;
-  boost::shared_ptr<TProcessorEventHandler> processorEventHandler_;
+  stdcxx::shared_ptr<EventLog> log_;
+  stdcxx::shared_ptr<Handler> handler_;
+  stdcxx::shared_ptr<Processor> processor_;
+  stdcxx::shared_ptr<TTransportFactory> transportFactory_;
+  stdcxx::shared_ptr<TProtocolFactory> protocolFactory_;
+  stdcxx::shared_ptr<TServerEventHandler> serverEventHandler_;
+  stdcxx::shared_ptr<TProcessorEventHandler> processorEventHandler_;
 };
 
 /**
  * Check that there are no more events in the log
  */
-void checkNoEvents(const boost::shared_ptr<EventLog>& log) {
+void checkNoEvents(const stdcxx::shared_ptr<EventLog>& log) {
   // Wait for an event with a very short timeout period.  We don't expect
   // anything to be present, so we will normally wait for the full timeout.
   // On the other hand, a non-zero timeout is nice since it does give a short
@@ -299,7 +299,7 @@ void checkNoEvents(const boost::shared_ptr<EventLog>& log) {
  *
  * Returns the connection ID allocated by the server.
  */
-uint32_t checkNewConnEvents(const boost::shared_ptr<EventLog>& log) {
+uint32_t checkNewConnEvents(const stdcxx::shared_ptr<EventLog>& log) {
   // Check for an ET_CONN_CREATED event
   Event event = log->waitForEvent(2500);
   BOOST_CHECK_EQUAL(EventLog::ET_CONN_CREATED, event.type);
@@ -314,7 +314,7 @@ uint32_t checkNewConnEvents(const 
boost::shared_ptr<EventLog>& log) {
 /**
  * Check for the events that should be logged when a connection is closed.
  */
-void checkCloseEvents(const boost::shared_ptr<EventLog>& log, uint32_t connId) 
{
+void checkCloseEvents(const stdcxx::shared_ptr<EventLog>& log, uint32_t 
connId) {
   // Check for an ET_CONN_DESTROYED event
   Event event = log->waitForEvent();
   BOOST_CHECK_EQUAL(EventLog::ET_CONN_DESTROYED, event.type);
@@ -332,7 +332,7 @@ void checkCloseEvents(const boost::shared_ptr<EventLog>& 
log, uint32_t connId) {
  *
  * Returns the call ID allocated by the server.
  */
-uint32_t checkCallHandlerEvents(const boost::shared_ptr<EventLog>& log,
+uint32_t checkCallHandlerEvents(const stdcxx::shared_ptr<EventLog>& log,
                                 uint32_t connId,
                                 EventType callType,
                                 const string& callName) {
@@ -369,7 +369,7 @@ uint32_t checkCallHandlerEvents(const 
boost::shared_ptr<EventLog>& log,
 /**
  * Check for the events that should be after a handler returns.
  */
-void checkCallPostHandlerEvents(const boost::shared_ptr<EventLog>& log,
+void checkCallPostHandlerEvents(const stdcxx::shared_ptr<EventLog>& log,
                                 uint32_t connId,
                                 uint32_t callId,
                                 const string& callName) {
@@ -409,7 +409,7 @@ void checkCallPostHandlerEvents(const 
boost::shared_ptr<EventLog>& log,
  *
  * Returns the call ID allocated by the server.
  */
-uint32_t checkCallEvents(const boost::shared_ptr<EventLog>& log,
+uint32_t checkCallEvents(const stdcxx::shared_ptr<EventLog>& log,
                          uint32_t connId,
                          EventType callType,
                          const string& callName) {
@@ -424,8 +424,8 @@ uint32_t checkCallEvents(const boost::shared_ptr<EventLog>& 
log,
  */
 
 template <typename State_>
-void testParentService(const boost::shared_ptr<State_>& state) {
-  boost::shared_ptr<typename State_::Client> client = state->createClient();
+void testParentService(const stdcxx::shared_ptr<State_>& state) {
+  stdcxx::shared_ptr<typename State_::Client> client = state->createClient();
 
   int32_t gen = client->getGeneration();
   int32_t newGen = client->incrementGeneration();
@@ -446,8 +446,8 @@ void testParentService(const boost::shared_ptr<State_>& 
state) {
 }
 
 template <typename State_>
-void testChildService(const boost::shared_ptr<State_>& state) {
-  boost::shared_ptr<typename State_::Client> client = state->createClient();
+void testChildService(const stdcxx::shared_ptr<State_>& state) {
+  stdcxx::shared_ptr<typename State_::Client> client = state->createClient();
 
   // Test calling some of the parent methids via the a child client
   int32_t gen = client->getGeneration();
@@ -468,7 +468,7 @@ void testBasicService() {
   typedef ServiceState<ServerTraits, ParentServiceTraits<TemplateTraits> > 
State;
 
   // Start the server
-  boost::shared_ptr<State> state(new State);
+  stdcxx::shared_ptr<State> state(new State);
   ServerThread serverThread(state, true);
 
   testParentService(state);
@@ -479,7 +479,7 @@ void testInheritedService() {
   typedef ServiceState<ServerTraits, ChildServiceTraits<TemplateTraits> > 
State;
 
   // Start the server
-  boost::shared_ptr<State> state(new State);
+  stdcxx::shared_ptr<State> state(new State);
   ServerThread serverThread(state, true);
 
   testParentService(state);
@@ -502,10 +502,10 @@ void testEventSequencing() {
                        TBufferedTransport> State;
 
   // Start the server
-  boost::shared_ptr<State> state(new State);
+  stdcxx::shared_ptr<State> state(new State);
   ServerThread serverThread(state, true);
 
-  const boost::shared_ptr<EventLog>& log = state->getLog();
+  const stdcxx::shared_ptr<EventLog>& log = state->getLog();
 
   // Make sure we're at the end of the log
   checkNoEvents(log);
@@ -514,7 +514,7 @@ void testEventSequencing() {
 
   // Make sure createContext() is called after a connection has been
   // established.  We open a plain socket instead of creating a client.
-  boost::shared_ptr<TSocket> socket(new TSocket("127.0.0.1", 
state->getPort()));
+  stdcxx::shared_ptr<TSocket> socket(new TSocket("127.0.0.1", 
state->getPort()));
   socket->open();
 
   // Make sure the proper events occurred after a new connection
@@ -592,7 +592,7 @@ void testEventSequencing() {
   checkNoEvents(log);
 
   // Read the response header
-  std::string responseName;
+  string responseName;
   int32_t responseSeqid = 0;
   apache::thrift::protocol::TMessageType responseType;
   protocol.readMessageBegin(responseName, responseType, responseSeqid);
@@ -635,19 +635,19 @@ void testSeparateConnections() {
   typedef ServiceState<ServerTraits, ChildServiceTraits<TemplateTraits> > 
State;
 
   // Start the server
-  boost::shared_ptr<State> state(new State);
+  stdcxx::shared_ptr<State> state(new State);
   ServerThread serverThread(state, true);
 
-  const boost::shared_ptr<EventLog>& log = state->getLog();
+  const stdcxx::shared_ptr<EventLog>& log = state->getLog();
 
   // Create a client
-  boost::shared_ptr<typename State::Client> client1 = state->createClient();
+  stdcxx::shared_ptr<typename State::Client> client1 = state->createClient();
 
   // Make sure the expected events were logged
   uint32_t client1Id = checkNewConnEvents(log);
 
   // Create a second client
-  boost::shared_ptr<typename State::Client> client2 = state->createClient();
+  stdcxx::shared_ptr<typename State::Client> client2 = state->createClient();
 
   // Make sure the expected events were logged
   uint32_t client2Id = checkNewConnEvents(log);
@@ -683,13 +683,13 @@ void testOnewayCall() {
   typedef ServiceState<ServerTraits, ChildServiceTraits<TemplateTraits> > 
State;
 
   // Start the server
-  boost::shared_ptr<State> state(new State);
+  stdcxx::shared_ptr<State> state(new State);
   ServerThread serverThread(state, true);
 
-  const boost::shared_ptr<EventLog>& log = state->getLog();
+  const stdcxx::shared_ptr<EventLog>& log = state->getLog();
 
   // Create a client
-  boost::shared_ptr<typename State::Client> client = state->createClient();
+  stdcxx::shared_ptr<typename State::Client> client = state->createClient();
   uint32_t connId = checkNewConnEvents(log);
 
   // Make a oneway call
@@ -735,13 +735,13 @@ void testExpectedError() {
   typedef ServiceState<ServerTraits, ChildServiceTraits<TemplateTraits> > 
State;
 
   // Start the server
-  boost::shared_ptr<State> state(new State);
+  stdcxx::shared_ptr<State> state(new State);
   ServerThread serverThread(state, true);
 
-  const boost::shared_ptr<EventLog>& log = state->getLog();
+  const stdcxx::shared_ptr<EventLog>& log = state->getLog();
 
   // Create a client
-  boost::shared_ptr<typename State::Client> client = state->createClient();
+  stdcxx::shared_ptr<typename State::Client> client = state->createClient();
   uint32_t connId = checkNewConnEvents(log);
 
   // Send the exceptionWait() call
@@ -768,8 +768,8 @@ void testExpectedError() {
   } catch (const MyError& e) {
     BOOST_CHECK_EQUAL(message, e.message);
     // Check if std::exception::what() is handled properly
-    size_t message_pos = std::string(e.what()).find("TException - service has 
thrown: MyError");
-    BOOST_CHECK_NE(message_pos, std::string::npos);
+    size_t message_pos = string(e.what()).find("TException - service has 
thrown: MyError");
+    BOOST_CHECK_NE(message_pos, string::npos);
   }
 
   // Now we should see the events for a normal call finish
@@ -790,13 +790,13 @@ void testUnexpectedError() {
   typedef ServiceState<ServerTraits, ChildServiceTraits<TemplateTraits> > 
State;
 
   // Start the server
-  boost::shared_ptr<State> state(new State);
+  stdcxx::shared_ptr<State> state(new State);
   ServerThread serverThread(state, true);
 
-  const boost::shared_ptr<EventLog>& log = state->getLog();
+  const stdcxx::shared_ptr<EventLog>& log = state->getLog();
 
   // Create a client
-  boost::shared_ptr<typename State::Client> client = state->createClient();
+  stdcxx::shared_ptr<typename State::Client> client = state->createClient();
   uint32_t connId = checkNewConnEvents(log);
 
   // Send the unexpectedExceptionWait() call
@@ -912,7 +912,7 @@ DEFINE_NOFRAME_TESTS(TSimpleServer, Untemplated)
 // For now, it is known not to work correctly with TProcessorEventHandler.
 #ifdef BOOST_TEST_DYN_LINK
 bool init_unit_test_suite() {
-  unit_test::framework::master_test_suite().p_name.value = "ProcessorTest";
+  ::boost::unit_test::framework::master_test_suite().p_name.value = 
"ProcessorTest";
   return true;
 }
 
@@ -920,10 +920,10 @@ int main( int argc, char* argv[] ) {
   return ::boost::unit_test::unit_test_main(&init_unit_test_suite,argc,argv);
 }
 #else
-unit_test::test_suite* init_unit_test_suite(int argc, char* argv[]) {
+::boost::unit_test::test_suite* init_unit_test_suite(int argc, char* argv[]) {
   THRIFT_UNUSED_VARIABLE(argc);
   THRIFT_UNUSED_VARIABLE(argv);
-  unit_test::framework::master_test_suite().p_name.value = "ProcessorTest";
+  ::boost::unit_test::framework::master_test_suite().p_name.value = 
"ProcessorTest";
   return NULL;
 }
 #endif

http://git-wip-us.apache.org/repos/asf/thrift/blob/82ae9575/lib/cpp/test/processor/ServerThread.cpp
----------------------------------------------------------------------
diff --git a/lib/cpp/test/processor/ServerThread.cpp 
b/lib/cpp/test/processor/ServerThread.cpp
index 009c4c6..e752d5e 100644
--- a/lib/cpp/test/processor/ServerThread.cpp
+++ b/lib/cpp/test/processor/ServerThread.cpp
@@ -130,7 +130,7 @@ void ServerThread::preServe() {
   serverState_->bindSuccessful(port_);
 
   // Set the real server event handler (replacing ourself)
-  boost::shared_ptr<server::TServerEventHandler> serverEventHandler
+  stdcxx::shared_ptr<server::TServerEventHandler> serverEventHandler
       = serverState_->getServerEventHandler();
   server_->setServerEventHandler(serverEventHandler);
 

http://git-wip-us.apache.org/repos/asf/thrift/blob/82ae9575/lib/cpp/test/processor/ServerThread.h
----------------------------------------------------------------------
diff --git a/lib/cpp/test/processor/ServerThread.h 
b/lib/cpp/test/processor/ServerThread.h
index 3803e7e..21c3b60 100644
--- a/lib/cpp/test/processor/ServerThread.h
+++ b/lib/cpp/test/processor/ServerThread.h
@@ -43,7 +43,7 @@ public:
    * If the server returned fails to bind to the specified port when serve() is
    * called on it, createServer() may be called again on a different port.
    */
-  virtual boost::shared_ptr<server::TServer> createServer(uint16_t port) = 0;
+  virtual stdcxx::shared_ptr<server::TServer> createServer(uint16_t port) = 0;
 
   /**
    * Get the TServerEventHandler to set on the server.
@@ -52,8 +52,8 @@ public:
    * start serving traffic.  It is invoked from the server thread, rather than
    * the main thread.
    */
-  virtual boost::shared_ptr<server::TServerEventHandler> 
getServerEventHandler() {
-    return boost::shared_ptr<server::TServerEventHandler>();
+  virtual stdcxx::shared_ptr<server::TServerEventHandler> 
getServerEventHandler() {
+    return stdcxx::shared_ptr<server::TServerEventHandler>();
   }
 
   /**
@@ -70,7 +70,7 @@ public:
  */
 class ServerThread {
 public:
-  ServerThread(const boost::shared_ptr<ServerState>& state, bool autoStart)
+  ServerThread(const stdcxx::shared_ptr<ServerState>& state, bool autoStart)
     : port_(0),
       running_(false),
       serving_(false),
@@ -116,7 +116,7 @@ protected:
   void run();
   void preServe();
 
-  boost::shared_ptr<Helper> helper_;
+  stdcxx::shared_ptr<Helper> helper_;
 
   uint16_t port_;
   bool running_;
@@ -124,9 +124,9 @@ protected:
   bool error_;
   concurrency::Monitor serverMonitor_;
 
-  boost::shared_ptr<ServerState> serverState_;
-  boost::shared_ptr<server::TServer> server_;
-  boost::shared_ptr<concurrency::Thread> thread_;
+  stdcxx::shared_ptr<ServerState> serverState_;
+  stdcxx::shared_ptr<server::TServer> server_;
+  stdcxx::shared_ptr<concurrency::Thread> thread_;
 };
 }
 }

http://git-wip-us.apache.org/repos/asf/thrift/blob/82ae9575/lib/cpp/test/qt/TQTcpServerTest.cpp
----------------------------------------------------------------------
diff --git a/lib/cpp/test/qt/TQTcpServerTest.cpp 
b/lib/cpp/test/qt/TQTcpServerTest.cpp
index 422d771..8a327aa 100644
--- a/lib/cpp/test/qt/TQTcpServerTest.cpp
+++ b/lib/cpp/test/qt/TQTcpServerTest.cpp
@@ -8,12 +8,12 @@
 #include <QThread>
 
 #ifndef Q_MOC_RUN
-  #include <boost/smart_ptr.hpp>
+  #include "thrift/stdcxx.h"
   #include "thrift/protocol/TBinaryProtocol.h"
   #include "thrift/async/TAsyncProcessor.h"
   #include "thrift/qt/TQTcpServer.h"
   #include "thrift/qt/TQIODeviceTransport.h"
-  
+
   #include "gen-cpp/ParentService.h"
 #endif
 
@@ -21,25 +21,25 @@ using namespace apache::thrift;
 
 struct AsyncHandler : public test::ParentServiceCobSvIf {
   std::vector<std::string> strings;
-  virtual void addString(tcxx::function<void()> cob, const std::string& s) {
+  virtual void addString(stdcxx::function<void()> cob, const std::string& s) {
     strings.push_back(s);
     cob();
   }
-  virtual void getStrings(tcxx::function<void(std::vector<std::string> const& 
_return)> cob) {
+  virtual void getStrings(stdcxx::function<void(std::vector<std::string> 
const& _return)> cob) {
     cob(strings);
   }
 
   // Overrides not used in this test
-  virtual void incrementGeneration(tcxx::function<void(int32_t const& 
_return)> cob) {}
-  virtual void getGeneration(tcxx::function<void(int32_t const& _return)> cob) 
{}
-  virtual void getDataWait(tcxx::function<void(std::string const& _return)> 
cob,
+  virtual void incrementGeneration(stdcxx::function<void(int32_t const& 
_return)> cob) {}
+  virtual void getGeneration(stdcxx::function<void(int32_t const& _return)> 
cob) {}
+  virtual void getDataWait(stdcxx::function<void(std::string const& _return)> 
cob,
                            const int32_t length) {}
-  virtual void onewayWait(tcxx::function<void()> cob) {}
+  virtual void onewayWait(stdcxx::function<void()> cob) {}
   virtual void exceptionWait(
-      tcxx::function<void()> cob,
-      tcxx::function<void(::apache::thrift::TDelayedException* _throw)> /* 
exn_cob */,
+      stdcxx::function<void()> cob,
+      stdcxx::function<void(::apache::thrift::TDelayedException* _throw)> /* 
exn_cob */,
       const std::string& message) {}
-  virtual void unexpectedExceptionWait(tcxx::function<void()> cob, const 
std::string& message) {}
+  virtual void unexpectedExceptionWait(stdcxx::function<void()> cob, const 
std::string& message) {}
 };
 
 class TQTcpServerTest : public QObject {
@@ -51,18 +51,18 @@ private slots:
   void test_communicate();
 
 private:
-  boost::shared_ptr<QThread> serverThread;
-  boost::shared_ptr<async::TQTcpServer> server;
-  boost::shared_ptr<test::ParentServiceClient> client;
+  stdcxx::shared_ptr<QThread> serverThread;
+  stdcxx::shared_ptr<async::TQTcpServer> server;
+  stdcxx::shared_ptr<test::ParentServiceClient> client;
 };
 
 void TQTcpServerTest::initTestCase() {
   // setup server
-  boost::shared_ptr<QTcpServer> serverSocket = 
boost::make_shared<QTcpServer>();
+  stdcxx::shared_ptr<QTcpServer> serverSocket = 
stdcxx::make_shared<QTcpServer>();
   server.reset(new async::TQTcpServer(serverSocket,
-                                      
boost::make_shared<test::ParentServiceAsyncProcessor>(
-                                          boost::make_shared<AsyncHandler>()),
-                                      
boost::make_shared<protocol::TBinaryProtocolFactory>()));
+                                      
stdcxx::make_shared<test::ParentServiceAsyncProcessor>(
+                                      stdcxx::make_shared<AsyncHandler>()),
+                                      
stdcxx::make_shared<protocol::TBinaryProtocolFactory>()));
   QVERIFY(serverSocket->listen(QHostAddress::LocalHost));
   int port = serverSocket->serverPort();
   QVERIFY(port > 0);
@@ -74,9 +74,9 @@ void TQTcpServerTest::initTestCase() {
   serverThread->start();
 
   // setup client
-  boost::shared_ptr<QTcpSocket> socket = boost::make_shared<QTcpSocket>();
-  client.reset(new 
test::ParentServiceClient(boost::make_shared<protocol::TBinaryProtocol>(
-      boost::make_shared<transport::TQIODeviceTransport>(socket))));
+  stdcxx::shared_ptr<QTcpSocket> socket = stdcxx::make_shared<QTcpSocket>();
+  client.reset(new 
test::ParentServiceClient(stdcxx::make_shared<protocol::TBinaryProtocol>(
+      stdcxx::make_shared<transport::TQIODeviceTransport>(socket))));
   socket->connectToHost(QHostAddress::LocalHost, port);
   QVERIFY(socket->waitForConnected());
 }

http://git-wip-us.apache.org/repos/asf/thrift/blob/82ae9575/test/cpp/src/StressTest.cpp
----------------------------------------------------------------------
diff --git a/test/cpp/src/StressTest.cpp b/test/cpp/src/StressTest.cpp
index 9371bce..5ff5e44 100644
--- a/test/cpp/src/StressTest.cpp
+++ b/test/cpp/src/StressTest.cpp
@@ -31,6 +31,7 @@
 #include <thrift/transport/TTransportUtils.h>
 #include <thrift/transport/TFileTransport.h>
 #include <thrift/TLogging.h>
+#include <thrift/stdcxx.h>
 
 #include "Service.h"
 #include <iostream>
@@ -107,8 +108,8 @@ enum TransportOpenCloseBehavior {
 };
 class ClientThread : public Runnable {
 public:
-  ClientThread(boost::shared_ptr<TTransport> transport,
-               boost::shared_ptr<ServiceIf> client,
+  ClientThread(stdcxx::shared_ptr<TTransport> transport,
+               stdcxx::shared_ptr<ServiceIf> client,
                Monitor& monitor,
                size_t& workerCount,
                size_t loopCount,
@@ -224,8 +225,8 @@ public:
     }
   }
 
-  boost::shared_ptr<TTransport> _transport;
-  boost::shared_ptr<ServiceIf> _client;
+  stdcxx::shared_ptr<TTransport> _transport;
+  stdcxx::shared_ptr<ServiceIf> _client;
   Monitor& _monitor;
   size_t& _workerCount;
   size_t _loopCount;
@@ -285,14 +286,14 @@ int main(int argc, char** argv) {
                             "server only.  Default is " << clientCount << endl
         << "\thelp           Prints this help text." << endl
         << "\tcall           Service method to call.  Default is " << callName 
<< endl
-        << "\tloop           The number of remote thrift calls each client 
makes.  Default is " << loopCount << endl 
+        << "\tloop           The number of remote thrift calls each client 
makes.  Default is " << loopCount << endl
         << "\tport           The port the server and clients should bind to "
                             "for thrift network connections.  Default is " << 
port << endl
-        << "\tserver         Run the Thrift server in this process.  Default 
is " << runServer << endl 
+        << "\tserver         Run the Thrift server in this process.  Default 
is " << runServer << endl
         << "\tserver-type    Type of server, \"simple\" or \"thread-pool\".  
Default is " << serverType << endl
         << "\tprotocol-type  Type of protocol, \"binary\", \"ascii\", or 
\"xml\".  Default is " << protocolType << endl
-        << "\tlog-request    Log all request to ./requestlog.tlog. Default is 
" << logRequests << endl 
-        << "\treplay-request Replay requests from log file (./requestlog.tlog) 
Default is " << replayRequests << endl 
+        << "\tlog-request    Log all request to ./requestlog.tlog. Default is 
" << logRequests << endl
+        << "\treplay-request Replay requests from log file (./requestlog.tlog) 
Default is " << replayRequests << endl
         << "\tworkers        Number of thread pools workers.  Only valid "
                             "for thread-pool server type.  Default is " << 
workerCount << endl
         << "\tclient-type    Type of client, \"regular\" or \"concurrent\".  
Default is " << clientType << endl
@@ -390,24 +391,24 @@ int main(int argc, char** argv) {
     cerr << usage.str();
   }
 
-  boost::shared_ptr<PlatformThreadFactory> threadFactory
-      = boost::shared_ptr<PlatformThreadFactory>(new PlatformThreadFactory());
+  stdcxx::shared_ptr<PlatformThreadFactory> threadFactory
+      = stdcxx::shared_ptr<PlatformThreadFactory>(new PlatformThreadFactory());
 
   // Dispatcher
-  boost::shared_ptr<Server> serviceHandler(new Server());
+  stdcxx::shared_ptr<Server> serviceHandler(new Server());
 
   if (replayRequests) {
-    boost::shared_ptr<Server> serviceHandler(new Server());
-    boost::shared_ptr<ServiceProcessor> serviceProcessor(new 
ServiceProcessor(serviceHandler));
+    stdcxx::shared_ptr<Server> serviceHandler(new Server());
+    stdcxx::shared_ptr<ServiceProcessor> serviceProcessor(new 
ServiceProcessor(serviceHandler));
 
     // Transports
-    boost::shared_ptr<TFileTransport> fileTransport(new 
TFileTransport(requestLogPath));
+    stdcxx::shared_ptr<TFileTransport> fileTransport(new 
TFileTransport(requestLogPath));
     fileTransport->setChunkSize(2 * 1024 * 1024);
     fileTransport->setMaxEventSize(1024 * 16);
     fileTransport->seekToEnd();
 
     // Protocol Factory
-    boost::shared_ptr<TProtocolFactory> protocolFactory(new 
TBinaryProtocolFactory());
+    stdcxx::shared_ptr<TProtocolFactory> protocolFactory(new 
TBinaryProtocolFactory());
 
     TFileProcessor fileProcessor(serviceProcessor, protocolFactory, 
fileTransport);
 
@@ -417,28 +418,28 @@ int main(int argc, char** argv) {
 
   if (runServer) {
 
-    boost::shared_ptr<ServiceProcessor> serviceProcessor(new 
ServiceProcessor(serviceHandler));
+    stdcxx::shared_ptr<ServiceProcessor> serviceProcessor(new 
ServiceProcessor(serviceHandler));
 
     // Transport
-    boost::shared_ptr<TServerSocket> serverSocket(new TServerSocket(port));
+    stdcxx::shared_ptr<TServerSocket> serverSocket(new TServerSocket(port));
 
     // Transport Factory
-    boost::shared_ptr<TTransportFactory> transportFactory(new 
TBufferedTransportFactory());
+    stdcxx::shared_ptr<TTransportFactory> transportFactory(new 
TBufferedTransportFactory());
 
     // Protocol Factory
-    boost::shared_ptr<TProtocolFactory> protocolFactory(new 
TBinaryProtocolFactory());
+    stdcxx::shared_ptr<TProtocolFactory> protocolFactory(new 
TBinaryProtocolFactory());
 
     if (logRequests) {
       // initialize the log file
-      boost::shared_ptr<TFileTransport> fileTransport(new 
TFileTransport(requestLogPath));
+      stdcxx::shared_ptr<TFileTransport> fileTransport(new 
TFileTransport(requestLogPath));
       fileTransport->setChunkSize(2 * 1024 * 1024);
       fileTransport->setMaxEventSize(1024 * 16);
 
       transportFactory
-          = boost::shared_ptr<TTransportFactory>(new 
TPipedTransportFactory(fileTransport));
+          = stdcxx::shared_ptr<TTransportFactory>(new 
TPipedTransportFactory(fileTransport));
     }
 
-    boost::shared_ptr<TServer> server;
+    stdcxx::shared_ptr<TServer> server;
 
     if (serverType == "simple") {
 
@@ -452,7 +453,7 @@ int main(int argc, char** argv) {
 
     } else if (serverType == "thread-pool") {
 
-      boost::shared_ptr<ThreadManager> threadManager
+      stdcxx::shared_ptr<ThreadManager> threadManager
           = ThreadManager::newSimpleThreadManager(workerCount);
 
       threadManager->threadFactory(threadFactory);
@@ -464,9 +465,9 @@ int main(int argc, char** argv) {
                                          threadManager));
     }
 
-    boost::shared_ptr<TStartObserver> observer(new TStartObserver);
+    stdcxx::shared_ptr<TStartObserver> observer(new TStartObserver);
     server->setServerEventHandler(observer);
-    boost::shared_ptr<Thread> serverThread = threadFactory->newThread(server);
+    stdcxx::shared_ptr<Thread> serverThread = threadFactory->newThread(server);
 
     cerr << "Starting the server on port " << port << endl;
 
@@ -485,7 +486,7 @@ int main(int argc, char** argv) {
 
     size_t threadCount = 0;
 
-    set<boost::shared_ptr<Thread> > clientThreads;
+    set<stdcxx::shared_ptr<Thread> > clientThreads;
 
     if (callName == "echoVoid") {
       loopType = T_VOID;
@@ -504,28 +505,28 @@ int main(int argc, char** argv) {
     if(clientType == "regular") {
       for (size_t ix = 0; ix < clientCount; ix++) {
 
-        boost::shared_ptr<TSocket> socket(new TSocket("127.0.0.1", port));
-        boost::shared_ptr<TBufferedTransport> bufferedSocket(new 
TBufferedTransport(socket, 2048));
-        boost::shared_ptr<TProtocol> protocol(new 
TBinaryProtocol(bufferedSocket));
-        boost::shared_ptr<ServiceClient> serviceClient(new 
ServiceClient(protocol));
+        stdcxx::shared_ptr<TSocket> socket(new TSocket("127.0.0.1", port));
+        stdcxx::shared_ptr<TBufferedTransport> bufferedSocket(new 
TBufferedTransport(socket, 2048));
+        stdcxx::shared_ptr<TProtocol> protocol(new 
TBinaryProtocol(bufferedSocket));
+        stdcxx::shared_ptr<ServiceClient> serviceClient(new 
ServiceClient(protocol));
 
-        
clientThreads.insert(threadFactory->newThread(boost::shared_ptr<ClientThread>(
+        
clientThreads.insert(threadFactory->newThread(stdcxx::shared_ptr<ClientThread>(
             new ClientThread(socket, serviceClient, monitor, threadCount, 
loopCount, loopType, OpenAndCloseTransportInThread))));
       }
     } else if(clientType == "concurrent") {
-      boost::shared_ptr<TSocket> socket(new TSocket("127.0.0.1", port));
-      boost::shared_ptr<TBufferedTransport> bufferedSocket(new 
TBufferedTransport(socket, 2048));
-      boost::shared_ptr<TProtocol> protocol(new 
TBinaryProtocol(bufferedSocket));
-      //boost::shared_ptr<ServiceClient> serviceClient(new 
ServiceClient(protocol));
-      boost::shared_ptr<ServiceConcurrentClient> serviceClient(new 
ServiceConcurrentClient(protocol));
+      stdcxx::shared_ptr<TSocket> socket(new TSocket("127.0.0.1", port));
+      stdcxx::shared_ptr<TBufferedTransport> bufferedSocket(new 
TBufferedTransport(socket, 2048));
+      stdcxx::shared_ptr<TProtocol> protocol(new 
TBinaryProtocol(bufferedSocket));
+      //stdcxx::shared_ptr<ServiceClient> serviceClient(new 
ServiceClient(protocol));
+      stdcxx::shared_ptr<ServiceConcurrentClient> serviceClient(new 
ServiceConcurrentClient(protocol));
       socket->open();
       for (size_t ix = 0; ix < clientCount; ix++) {
-        
clientThreads.insert(threadFactory->newThread(boost::shared_ptr<ClientThread>(
+        
clientThreads.insert(threadFactory->newThread(stdcxx::shared_ptr<ClientThread>(
             new ClientThread(socket, serviceClient, monitor, threadCount, 
loopCount, loopType, DontOpenAndCloseTransportInThread))));
       }
     }
 
-    for (std::set<boost::shared_ptr<Thread> >::const_iterator thread = 
clientThreads.begin();
+    for (std::set<stdcxx::shared_ptr<Thread> >::const_iterator thread = 
clientThreads.begin();
          thread != clientThreads.end();
          thread++) {
       (*thread)->start();
@@ -558,12 +559,12 @@ int main(int argc, char** argv) {
     int64_t minTime = 9223372036854775807LL;
     int64_t maxTime = 0;
 
-    for (set<boost::shared_ptr<Thread> >::iterator ix = clientThreads.begin();
+    for (set<stdcxx::shared_ptr<Thread> >::iterator ix = clientThreads.begin();
          ix != clientThreads.end();
          ix++) {
 
-      boost::shared_ptr<ClientThread> client
-          = boost::dynamic_pointer_cast<ClientThread>((*ix)->runnable());
+      stdcxx::shared_ptr<ClientThread> client
+          = stdcxx::dynamic_pointer_cast<ClientThread>((*ix)->runnable());
 
       int64_t delta = client->_endTime - client->_startTime;
 

Reply via email to