THRIFT-922. cpp: Templatize binary and compact protocol

Convert TBinaryProtocol and TCompactProtocol to template classes, taking
the transport class as a template parameter.  This allows them to make
non-virtual calls when using the template, improving serialization
performance.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005136 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/cpp/src/TestClient.cpp b/test/cpp/src/TestClient.cpp
index 4764a4c..8ae819a 100644
--- a/test/cpp/src/TestClient.cpp
+++ b/test/cpp/src/TestClient.cpp
@@ -75,7 +75,7 @@
   }
 
 
-  shared_ptr<TTransport> transport;
+  shared_ptr<TBufferBase> transport;
 
   shared_ptr<TSocket> socket(new TSocket(host, port));
 
@@ -87,7 +87,8 @@
     transport = bufferedSocket;
   }
 
-  shared_ptr<TBinaryProtocol> protocol(new TBinaryProtocol(transport));
+  shared_ptr< TBinaryProtocolT<TBufferBase> > protocol(
+      new TBinaryProtocolT<TBufferBase>(transport));
   ThriftTestClient testClient(protocol);
 
   uint64_t time_min = 0;