remove stdcxx namespace and use std directly
diff --git a/lib/cpp/test/qt/TQTcpServerTest.cpp b/lib/cpp/test/qt/TQTcpServerTest.cpp
index 8a327aa..58d0c6d 100644
--- a/lib/cpp/test/qt/TQTcpServerTest.cpp
+++ b/lib/cpp/test/qt/TQTcpServerTest.cpp
@@ -8,7 +8,6 @@
#include <QThread>
#ifndef Q_MOC_RUN
- #include "thrift/stdcxx.h"
#include "thrift/protocol/TBinaryProtocol.h"
#include "thrift/async/TAsyncProcessor.h"
#include "thrift/qt/TQTcpServer.h"
@@ -21,25 +20,25 @@
struct AsyncHandler : public test::ParentServiceCobSvIf {
std::vector<std::string> strings;
- virtual void addString(stdcxx::function<void()> cob, const std::string& s) {
+ virtual void addString(std::function<void()> cob, const std::string& s) {
strings.push_back(s);
cob();
}
- virtual void getStrings(stdcxx::function<void(std::vector<std::string> const& _return)> cob) {
+ virtual void getStrings(std::function<void(std::vector<std::string> const& _return)> cob) {
cob(strings);
}
// Overrides not used in this test
- 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,
+ virtual void incrementGeneration(std::function<void(int32_t const& _return)> cob) {}
+ virtual void getGeneration(std::function<void(int32_t const& _return)> cob) {}
+ virtual void getDataWait(std::function<void(std::string const& _return)> cob,
const int32_t length) {}
- virtual void onewayWait(stdcxx::function<void()> cob) {}
+ virtual void onewayWait(std::function<void()> cob) {}
virtual void exceptionWait(
- stdcxx::function<void()> cob,
- stdcxx::function<void(::apache::thrift::TDelayedException* _throw)> /* exn_cob */,
+ std::function<void()> cob,
+ std::function<void(::apache::thrift::TDelayedException* _throw)> /* exn_cob */,
const std::string& message) {}
- virtual void unexpectedExceptionWait(stdcxx::function<void()> cob, const std::string& message) {}
+ virtual void unexpectedExceptionWait(std::function<void()> cob, const std::string& message) {}
};
class TQTcpServerTest : public QObject {
@@ -51,18 +50,18 @@
void test_communicate();
private:
- stdcxx::shared_ptr<QThread> serverThread;
- stdcxx::shared_ptr<async::TQTcpServer> server;
- stdcxx::shared_ptr<test::ParentServiceClient> client;
+ std::shared_ptr<QThread> serverThread;
+ std::shared_ptr<async::TQTcpServer> server;
+ std::shared_ptr<test::ParentServiceClient> client;
};
void TQTcpServerTest::initTestCase() {
// setup server
- stdcxx::shared_ptr<QTcpServer> serverSocket = stdcxx::make_shared<QTcpServer>();
+ std::shared_ptr<QTcpServer> serverSocket = std::make_shared<QTcpServer>();
server.reset(new async::TQTcpServer(serverSocket,
- stdcxx::make_shared<test::ParentServiceAsyncProcessor>(
- stdcxx::make_shared<AsyncHandler>()),
- stdcxx::make_shared<protocol::TBinaryProtocolFactory>()));
+ std::make_shared<test::ParentServiceAsyncProcessor>(
+ std::make_shared<AsyncHandler>()),
+ std::make_shared<protocol::TBinaryProtocolFactory>()));
QVERIFY(serverSocket->listen(QHostAddress::LocalHost));
int port = serverSocket->serverPort();
QVERIFY(port > 0);
@@ -74,9 +73,9 @@
serverThread->start();
// setup client
- 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))));
+ std::shared_ptr<QTcpSocket> socket = std::make_shared<QTcpSocket>();
+ client.reset(new test::ParentServiceClient(std::make_shared<protocol::TBinaryProtocol>(
+ std::make_shared<transport::TQIODeviceTransport>(socket))));
socket->connectToHost(QHostAddress::LocalHost, port);
QVERIFY(socket->waitForConnected());
}