summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/dispatcher/Client.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2012-08-10 23:53:37 +0200
committerJose <jose@zeroc.com>2012-08-10 23:53:37 +0200
commit1d5c04bb8c0e786a717e36467e17f34bcc4f1d95 (patch)
treec1c91f034589260e97033131061d536ecfc2b9cb /cpp/test/Ice/dispatcher/Client.cpp
parentICE-4702 - Poor hash algorithm (diff)
downloadice-1d5c04bb8c0e786a717e36467e17f34bcc4f1d95.tar.bz2
ice-1d5c04bb8c0e786a717e36467e17f34bcc4f1d95.tar.xz
ice-1d5c04bb8c0e786a717e36467e17f34bcc4f1d95.zip
C++11 ami lambda support
Diffstat (limited to 'cpp/test/Ice/dispatcher/Client.cpp')
-rw-r--r--cpp/test/Ice/dispatcher/Client.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/cpp/test/Ice/dispatcher/Client.cpp b/cpp/test/Ice/dispatcher/Client.cpp
index da86ee480af..8060023eeac 100644
--- a/cpp/test/Ice/dispatcher/Client.cpp
+++ b/cpp/test/Ice/dispatcher/Client.cpp
@@ -29,13 +29,24 @@ main(int argc, char* argv[])
{
int status;
Ice::CommunicatorPtr communicator;
-
+
try
{
Ice::InitializationData initData;
initData.properties = Ice::createProperties(argc, argv);
+#ifdef ICE_CPP11
+ Ice::DispatcherPtr dispatcher = new Dispatcher();
+ initData.dispatcher = Ice::newDispatcher(
+ [=](const Ice::DispatcherCallPtr& call, const Ice::ConnectionPtr& conn)
+ {
+ dispatcher->dispatch(call, conn);
+ });
+#else
initData.dispatcher = new Dispatcher();
+#endif
communicator = Ice::initialize(argc, argv, initData);
+
+
status = run(argc, argv, communicator);
}
catch(const Ice::Exception& ex)