Lines Matching refs:__f

120 _LIBCPP_HIDE_FROM_ABI bool __not_null(function<_Fp> const& __f) {
121 return !!__f;
155 _LIBCPP_HIDE_FROM_ABI explicit __alloc_func(_Target&& __f)
156 : __f_(piecewise_construct, std::forward_as_tuple(std::move(__f)), std::forward_as_tuple()) {}
158 _LIBCPP_HIDE_FROM_ABI explicit __alloc_func(const _Target& __f, const _Alloc& __a)
159 : __f_(piecewise_construct, std::forward_as_tuple(__f), std::forward_as_tuple(__a)) {}
161 _LIBCPP_HIDE_FROM_ABI explicit __alloc_func(const _Target& __f, _Alloc&& __a)
162 … : __f_(piecewise_construct, std::forward_as_tuple(__f), std::forward_as_tuple(std::move(__a))) {}
164 _LIBCPP_HIDE_FROM_ABI explicit __alloc_func(_Target&& __f, _Alloc&& __a)
165 …: __f_(piecewise_construct, std::forward_as_tuple(std::move(__f)), std::forward_as_tuple(std::move…
184 _LIBCPP_HIDE_FROM_ABI static void __destroy_and_delete(__alloc_func* __f) {
187 _FunAlloc __a(__f->__get_allocator());
188 __f->destroy();
189 __a.deallocate(__f, 1);
202 _LIBCPP_HIDE_FROM_ABI explicit __default_alloc_func(_Target&& __f) : __f_(std::move(__f)) {}
204 _LIBCPP_HIDE_FROM_ABI explicit __default_alloc_func(const _Target& __f) : __f_(__f) {}
220 _LIBCPP_HIDE_FROM_ABI static void __destroy_and_delete(__default_alloc_func* __f) {
221 __f->destroy();
222 __builtin_new_allocator::__deallocate_type<__default_alloc_func>(__f, 1);
260 _LIBCPP_HIDE_FROM_ABI explicit __func(_Fp&& __f) : __f_(std::move(__f)) {}
262 _LIBCPP_HIDE_FROM_ABI explicit __func(const _Fp& __f, const _Alloc& __a) : __f_(__f, __a) {}
264 _LIBCPP_HIDE_FROM_ABI explicit __func(const _Fp& __f, _Alloc&& __a) : __f_(__f, std::move(__a)) {}
266 …_LIBCPP_HIDE_FROM_ABI explicit __func(_Fp&& __f, _Alloc&& __a) : __f_(std::move(__f), std::move(__…
350 _LIBCPP_HIDE_FROM_ABI __value_func(_Fp&& __f, const _Alloc& __a) : __f_(nullptr) {
355 if (__function::__not_null(__f)) {
359 __f_ = ::new ((void*)&__buf_) _Fun(std::move(__f), _Alloc(__af));
363 ::new ((void*)__hold.get()) _Fun(std::move(__f), _Alloc(__a));
370 …_LIBCPP_HIDE_FROM_ABI explicit __value_func(_Fp&& __f) : __value_func(std::forward<_Fp>(__f), allo…
372 _LIBCPP_HIDE_FROM_ABI __value_func(const __value_func& __f) {
373 if (__f.__f_ == nullptr)
375 else if ((void*)__f.__f_ == &__f.__buf_) {
377 __f.__f_->__clone(__f_);
379 __f_ = __f.__f_->__clone();
382 _LIBCPP_HIDE_FROM_ABI __value_func(__value_func&& __f) _NOEXCEPT {
383 if (__f.__f_ == nullptr)
385 else if ((void*)__f.__f_ == &__f.__buf_) {
387 __f.__f_->__clone(__f_);
389 __f_ = __f.__f_;
390 __f.__f_ = nullptr;
401 _LIBCPP_HIDE_FROM_ABI __value_func& operator=(__value_func&& __f) {
403 if (__f.__f_ == nullptr)
405 else if ((void*)__f.__f_ == &__f.__buf_) {
407 __f.__f_->__clone(__f_);
409 __f_ = __f.__f_;
410 __f.__f_ = nullptr;
416 __func* __f = __f_;
418 if ((void*)__f == &__buf_)
419 __f->destroy();
420 else if (__f)
421 __f->destroy_deallocate();
431 _LIBCPP_HIDE_FROM_ABI void swap(__value_func& __f) _NOEXCEPT {
432 if (&__f == this)
434 if ((void*)__f_ == &__buf_ && (void*)__f.__f_ == &__f.__buf_) {
442 __f.__f_->__clone(__as_base(&__buf_));
443 __f.__f_->destroy();
444 __f.__f_ = nullptr;
446 __t->__clone(__as_base(&__f.__buf_));
448 __f.__f_ = __as_base(&__f.__buf_);
450 __f_->__clone(__as_base(&__f.__buf_));
452 __f_ = __f.__f_;
453 __f.__f_ = __as_base(&__f.__buf_);
454 } else if ((void*)__f.__f_ == &__f.__buf_) {
455 __f.__f_->__clone(__as_base(&__buf_));
456 __f.__f_->destroy();
457 __f.__f_ = __f_;
460 std::swap(__f_, __f.__f_);
533 const _Fun* __f = static_cast<const _Fun*>(__s);
534 return __f->__clone();
607 …_Fun* __f = reinterpret_cast<_Fun*>(__use_small_storage<_Fun>::value ? &__buf->__small : __buf->__…
608 return (*__f)(std::forward<_ArgTypes>(__args)...);
637 …_LIBCPP_HIDE_FROM_ABI __policy_func(_Fp&& __f, const _Alloc& __a) : __policy_(__policy::__create_e…
642 if (__function::__not_null(__f)) {
648 ::new ((void*)&__buf_.__small) _Fun(std::move(__f), _Alloc(__af));
652 ::new ((void*)__hold.get()) _Fun(std::move(__f), _Alloc(__af));
659 _LIBCPP_HIDE_FROM_ABI explicit __policy_func(_Fp&& __f) : __policy_(__policy::__create_empty()) {
662 if (__function::__not_null(__f)) {
666 ::new ((void*)&__buf_.__small) _Fun(std::move(__f));
669 … __buf_.__large = ::new ((void*)__hold.get()) _Fun(std::move(__f));
675 _LIBCPP_HIDE_FROM_ABI __policy_func(const __policy_func& __f)
676 : __buf_(__f.__buf_), __invoker_(__f.__invoker_), __policy_(__f.__policy_) {
678 __buf_.__large = __policy_->__clone(__f.__buf_.__large);
681 _LIBCPP_HIDE_FROM_ABI __policy_func(__policy_func&& __f)
682 : __buf_(__f.__buf_), __invoker_(__f.__invoker_), __policy_(__f.__policy_) {
684 __f.__policy_ = __policy::__create_empty();
685 __f.__invoker_ = __invoker();
694 _LIBCPP_HIDE_FROM_ABI __policy_func& operator=(__policy_func&& __f) {
696 __buf_ = __f.__buf_;
697 __invoker_ = __f.__invoker_;
698 __policy_ = __f.__policy_;
699 __f.__policy_ = __policy::__create_empty();
700 __f.__invoker_ = __invoker();
717 _LIBCPP_HIDE_FROM_ABI void swap(__policy_func& __f) {
718 std::swap(__invoker_, __f.__invoker_);
719 std::swap(__policy_, __f.__policy_);
720 std::swap(__buf_, __f.__buf_);
751 _LIBCPP_HIDE_FROM_ABI explicit __func(__block_type const& __f)
753 : __f_(__f)
755 : __f_(reinterpret_cast<__block_type>(__f ? _Block_copy(__f) : nullptr))
762 _LIBCPP_HIDE_FROM_ABI explicit __func(__block_type __f, const _Alloc& /* unused */)
764 : __f_(__f)
766 : __f_(reinterpret_cast<__block_type>(__f ? _Block_copy(__f) : nullptr))
864 _LIBCPP_HIDE_FROM_ABI function(allocator_arg_t, const _Alloc& __a, _Fp __f);
880 _LIBCPP_HIDE_FROM_ABI void assign(_Fp&& __f, const _Alloc& __a) {
881 function(allocator_arg, __a, std::forward<_Fp>(__f)).swap(*this);
919 function<_Rp(_ArgTypes...)>::function(const function& __f) : __f_(__f.__f_) {}
924 …p(_ArgTypes...)>::function(allocator_arg_t, const _Alloc&, const function& __f) : __f_(__f.__f_) {}
928 function<_Rp(_ArgTypes...)>::function(function&& __f) _NOEXCEPT : __f_(std::move(__f.__f_)) {}
933 …Types...)>::function(allocator_arg_t, const _Alloc&, function&& __f) : __f_(std::move(__f.__f_)) {}
938 function<_Rp(_ArgTypes...)>::function(_Fp __f) : __f_(std::move(__f)) {}
943 …ArgTypes...)>::function(allocator_arg_t, const _Alloc& __a, _Fp __f) : __f_(std::move(__f), __a) {}
947 function<_Rp(_ArgTypes...)>& function<_Rp(_ArgTypes...)>::operator=(const function& __f) {
948 function(__f).swap(*this);
953 function<_Rp(_ArgTypes...)>& function<_Rp(_ArgTypes...)>::operator=(function&& __f) _NOEXCEPT {
954 __f_ = std::move(__f.__f_);
966 function<_Rp(_ArgTypes...)>& function<_Rp(_ArgTypes...)>::operator=(_Fp&& __f) {
967 function(std::forward<_Fp>(__f)).swap(*this);
975 void function<_Rp(_ArgTypes...)>::swap(function& __f) _NOEXCEPT {
976 __f_.swap(__f.__f_);
1006 inline _LIBCPP_HIDE_FROM_ABI bool operator==(const function<_Rp(_ArgTypes...)>& __f, nullptr_t) _NO…
1007 return !__f;
1013 inline _LIBCPP_HIDE_FROM_ABI bool operator==(nullptr_t, const function<_Rp(_ArgTypes...)>& __f) _NO…
1014 return !__f;
1018 inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const function<_Rp(_ArgTypes...)>& __f, nullptr_t) _NO…
1019 return (bool)__f;
1023 inline _LIBCPP_HIDE_FROM_ABI bool operator!=(nullptr_t, const function<_Rp(_ArgTypes...)>& __f) _NO…
1024 return (bool)__f;