leapmotion/autowiring — pull request #128 by GabrielHare (2014-09-27 00:31:37+00:00)
Title: Ref auto out nocopy

TEST MSVC!

The previous implementation of auto_out inherited from unique_ptr, which is a move-only object. In order to make AutoStile work it was necessary to make the copy construction of auto_out implicitly a move. On MSVC this resulted in build errors.

The new implementation of auto_out inherits from shared_ptr. In order to prevent repeated outputs, the copy constructor triggers an output commitment, rather than implementing a move.

Because lambda captures cannot use move semantics AutoStile uses AutoPacket::Put(shared_ptr, source) method to retrieve data from the slave context, declare the source to be AutoStile, as auto_out would have.