ecorm / cppwamp

C++ client library for the WAMP protocol.
Boost Software License 1.0
35 stars 9 forks source link

Emulate lambda move capture #94

Closed ecorm closed 2 years ago

ecorm commented 8 years ago

Many objects throughout the library code end up being by captured by value, instead of being move-captured into lambda functions. Choose a method of emulating move-capture from http://stackoverflow.com/questions/8640393 (or another source), and perform it wherever possible.

Move capture is implemented in C++14, but I want C++11 to be the minimum compiler requirement for this library.

ecorm commented 2 years ago

Instead of emulating move capture, use a macro that either does copy capture or move capture, depending if move capture is available. The __cpp_init_captures>=201304 feature test macro could be checked for availability.