proxygen
|
#include <MoveWrapper.h>
Public Member Functions | |
MoveWrapper ()=default | |
MoveWrapper (T &&t) | |
Move a value in. More... | |
MoveWrapper (const MoveWrapper &other) | |
copy is move More... | |
MoveWrapper (MoveWrapper &&other) | |
move is also move More... | |
const T & | operator* () const |
T & | operator* () |
const T * | operator-> () const |
T * | operator-> () |
T && | move () |
move the value out (sugar for std::move(*moveWrapper)) More... | |
MoveWrapper & | operator= (MoveWrapper const &)=delete |
MoveWrapper & | operator= (MoveWrapper &&)=delete |
Private Attributes | |
T | value |
C++11 closures don't support move-in capture. Nor does std::bind. facepalm.
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3610.html
"[...] a work-around that should make people's stomach crawl: write a wrapper that performs move-on-copy, much like the deprecated auto_ptr"
Unlike auto_ptr, this doesn't require a heap allocation.
Definition at line 35 of file MoveWrapper.h.
|
default |
If value can be default-constructed, why not? Then we don't have to move it in
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
move the value out (sugar for std::move(*moveWrapper))
Definition at line 65 of file MoveWrapper.h.
References folly::gen::move, folly::MoveWrapper< T >::operator=(), and folly::MoveWrapper< T >::value.
|
inline |
Definition at line 50 of file MoveWrapper.h.
References folly::MoveWrapper< T >::value.
|
inline |
Definition at line 53 of file MoveWrapper.h.
References folly::MoveWrapper< T >::value.
|
inline |
Definition at line 57 of file MoveWrapper.h.
References folly::MoveWrapper< T >::value.
|
inline |
Definition at line 60 of file MoveWrapper.h.
References folly::MoveWrapper< T >::value.
|
delete |
Referenced by folly::MoveWrapper< T >::move().
|
delete |
|
mutableprivate |
Definition at line 75 of file MoveWrapper.h.
Referenced by folly::MoveWrapper< T >::move(), folly::MoveWrapper< T >::operator*(), and folly::MoveWrapper< T >::operator->().