diff options
author | Jose <jose@zeroc.com> | 2012-08-10 23:53:37 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2012-08-10 23:53:37 +0200 |
commit | 1d5c04bb8c0e786a717e36467e17f34bcc4f1d95 (patch) | |
tree | c1c91f034589260e97033131061d536ecfc2b9cb /cpp/test/Ice/dispatcher/Server.cpp | |
parent | ICE-4702 - Poor hash algorithm (diff) | |
download | ice-1d5c04bb8c0e786a717e36467e17f34bcc4f1d95.tar.bz2 ice-1d5c04bb8c0e786a717e36467e17f34bcc4f1d95.tar.xz ice-1d5c04bb8c0e786a717e36467e17f34bcc4f1d95.zip |
C++11 ami lambda support
Diffstat (limited to 'cpp/test/Ice/dispatcher/Server.cpp')
-rw-r--r-- | cpp/test/Ice/dispatcher/Server.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cpp/test/Ice/dispatcher/Server.cpp b/cpp/test/Ice/dispatcher/Server.cpp index e517301982b..53e4ce4a359 100644 --- a/cpp/test/Ice/dispatcher/Server.cpp +++ b/cpp/test/Ice/dispatcher/Server.cpp @@ -50,7 +50,16 @@ main(int argc, char* argv[]) { 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); } |