Created
January 21, 2015 18:48
-
-
Save flandr/dc4475761a5929e1fa01 to your computer and use it in GitHub Desktop.
xcode 6.1.1 std functional move constructor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<class _Rp, class ..._ArgTypes> | |
template <class _Alloc> | |
function<_Rp(_ArgTypes...)>::function(allocator_arg_t, const _Alloc&, | |
function&& __f) | |
{ | |
if (__f.__f_ == 0) | |
__f_ = 0; | |
else if (__f.__f_ == (__base*)&__f.__buf_) | |
{ | |
__f_ = (__base*)&__buf_; | |
__f.__f_->__clone(__f_); | |
} | |
else | |
{ | |
__f_ = __f.__f_; | |
__f.__f_ = 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment