diff options
author | Jose <jose@zeroc.com> | 2015-12-17 17:52:44 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2015-12-17 17:52:44 +0100 |
commit | 061e8b03290cd88b14943b30a372a28f3a7365e0 (patch) | |
tree | 0a0a2b10b9fc1f835c6ada152049d6848a92a28f /cpp/src/Ice/IncomingAsync.cpp | |
parent | Fix Python Ice/slicing/objects test (diff) | |
download | ice-061e8b03290cd88b14943b30a372a28f3a7365e0.tar.bz2 ice-061e8b03290cd88b14943b30a372a28f3a7365e0.tar.xz ice-061e8b03290cd88b14943b30a372a28f3a7365e0.zip |
C++11 DispatchInterceptor fixes
Diffstat (limited to 'cpp/src/Ice/IncomingAsync.cpp')
-rw-r--r-- | cpp/src/Ice/IncomingAsync.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/cpp/src/Ice/IncomingAsync.cpp b/cpp/src/Ice/IncomingAsync.cpp index 3b4820cdbbb..835963b9c0d 100644 --- a/cpp/src/Ice/IncomingAsync.cpp +++ b/cpp/src/Ice/IncomingAsync.cpp @@ -64,12 +64,32 @@ IceInternal::IncomingAsync::IncomingAsync(Incoming& in) : _retriable(in.isRetriable()), _active(true) { +#ifndef ICE_CPP11_MAPPING if(_retriable) { + // + // With C++11 maping we cannot call setActive from the ctor as + // it creates a smart pointer to this object, and with shared_ptr + // this requires a fully constructed object. + // in.setActive(*this); } +#endif } +#ifdef ICE_CPP11_MAPPING +IncomingAsyncPtr +IceInternal::IncomingAsync::create(Incoming& in) +{ + IncomingAsyncPtr self(new IncomingAsync(in)); + if(in.isRetriable()) + { + in.setActive(*self.get()); + } + return self; +} +#endif + void IceInternal::IncomingAsync::__deactivate(Incoming& in) { |