Lines Matching refs:__f
122 _LIBCPP_HIDE_FROM_ABI bool __not_null(function<_Fp> const& __f) {
123 return !!__f;
157 _LIBCPP_HIDE_FROM_ABI explicit __alloc_func(_Target&& __f)
158 : __f_(piecewise_construct, std::forward_as_tuple(std::move(__f)), std::forward_as_tuple()) {}
160 _LIBCPP_HIDE_FROM_ABI explicit __alloc_func(const _Target& __f, const _Alloc& __a)
161 : __f_(piecewise_construct, std::forward_as_tuple(__f), std::forward_as_tuple(__a)) {}
163 _LIBCPP_HIDE_FROM_ABI explicit __alloc_func(const _Target& __f, _Alloc&& __a)
164 … : __f_(piecewise_construct, std::forward_as_tuple(__f), std::forward_as_tuple(std::move(__a))) {}
166 _LIBCPP_HIDE_FROM_ABI explicit __alloc_func(_Target&& __f, _Alloc&& __a)
167 …: __f_(piecewise_construct, std::forward_as_tuple(std::move(__f)), std::forward_as_tuple(std::move…
186 _LIBCPP_HIDE_FROM_ABI static void __destroy_and_delete(__alloc_func* __f) {
189 _FunAlloc __a(__f->__get_allocator());
190 __f->destroy();
191 __a.deallocate(__f, 1);
204 _LIBCPP_HIDE_FROM_ABI explicit __default_alloc_func(_Target&& __f) : __f_(std::move(__f)) {}
206 _LIBCPP_HIDE_FROM_ABI explicit __default_alloc_func(const _Target& __f) : __f_(__f) {}
222 _LIBCPP_HIDE_FROM_ABI static void __destroy_and_delete(__default_alloc_func* __f) {
223 __f->destroy();
224 __builtin_new_allocator::__deallocate_type<__default_alloc_func>(__f, 1);
262 _LIBCPP_HIDE_FROM_ABI explicit __func(_Fp&& __f) : __f_(std::move(__f)) {}
264 _LIBCPP_HIDE_FROM_ABI explicit __func(const _Fp& __f, const _Alloc& __a) : __f_(__f, __a) {}
266 _LIBCPP_HIDE_FROM_ABI explicit __func(const _Fp& __f, _Alloc&& __a) : __f_(__f, std::move(__a)) {}
268 …_LIBCPP_HIDE_FROM_ABI explicit __func(_Fp&& __f, _Alloc&& __a) : __f_(std::move(__f), std::move(__…
352 _LIBCPP_HIDE_FROM_ABI __value_func(_Fp&& __f, const _Alloc& __a) : __f_(nullptr) {
357 if (__function::__not_null(__f)) {
361 __f_ = ::new ((void*)&__buf_) _Fun(std::move(__f), _Alloc(__af));
365 ::new ((void*)__hold.get()) _Fun(std::move(__f), _Alloc(__a));
372 …_LIBCPP_HIDE_FROM_ABI explicit __value_func(_Fp&& __f) : __value_func(std::forward<_Fp>(__f), allo…
374 _LIBCPP_HIDE_FROM_ABI __value_func(const __value_func& __f) {
375 if (__f.__f_ == nullptr)
377 else if ((void*)__f.__f_ == &__f.__buf_) {
379 __f.__f_->__clone(__f_);
381 __f_ = __f.__f_->__clone();
384 _LIBCPP_HIDE_FROM_ABI __value_func(__value_func&& __f) _NOEXCEPT {
385 if (__f.__f_ == nullptr)
387 else if ((void*)__f.__f_ == &__f.__buf_) {
389 __f.__f_->__clone(__f_);
391 __f_ = __f.__f_;
392 __f.__f_ = nullptr;
403 _LIBCPP_HIDE_FROM_ABI __value_func& operator=(__value_func&& __f) {
405 if (__f.__f_ == nullptr)
407 else if ((void*)__f.__f_ == &__f.__buf_) {
409 __f.__f_->__clone(__f_);
411 __f_ = __f.__f_;
412 __f.__f_ = nullptr;
418 __func* __f = __f_;
420 if ((void*)__f == &__buf_)
421 __f->destroy();
422 else if (__f)
423 __f->destroy_deallocate();
433 _LIBCPP_HIDE_FROM_ABI void swap(__value_func& __f) _NOEXCEPT {
434 if (&__f == this)
436 if ((void*)__f_ == &__buf_ && (void*)__f.__f_ == &__f.__buf_) {
444 __f.__f_->__clone(__as_base(&__buf_));
445 __f.__f_->destroy();
446 __f.__f_ = nullptr;
448 __t->__clone(__as_base(&__f.__buf_));
450 __f.__f_ = __as_base(&__f.__buf_);
452 __f_->__clone(__as_base(&__f.__buf_));
454 __f_ = __f.__f_;
455 __f.__f_ = __as_base(&__f.__buf_);
456 } else if ((void*)__f.__f_ == &__f.__buf_) {
457 __f.__f_->__clone(__as_base(&__buf_));
458 __f.__f_->destroy();
459 __f.__f_ = __f_;
462 std::swap(__f_, __f.__f_);
535 const _Fun* __f = static_cast<const _Fun*>(__s);
536 return __f->__clone();
609 …_Fun* __f = reinterpret_cast<_Fun*>(__use_small_storage<_Fun>::value ? &__buf->__small : __buf->__…
610 return (*__f)(std::forward<_ArgTypes>(__args)...);
639 …_LIBCPP_HIDE_FROM_ABI __policy_func(_Fp&& __f, const _Alloc& __a) : __policy_(__policy::__create_e…
644 if (__function::__not_null(__f)) {
650 ::new ((void*)&__buf_.__small) _Fun(std::move(__f), _Alloc(__af));
654 ::new ((void*)__hold.get()) _Fun(std::move(__f), _Alloc(__af));
661 _LIBCPP_HIDE_FROM_ABI explicit __policy_func(_Fp&& __f) : __policy_(__policy::__create_empty()) {
664 if (__function::__not_null(__f)) {
668 ::new ((void*)&__buf_.__small) _Fun(std::move(__f));
671 … __buf_.__large = ::new ((void*)__hold.get()) _Fun(std::move(__f));
677 _LIBCPP_HIDE_FROM_ABI __policy_func(const __policy_func& __f)
678 : __buf_(__f.__buf_), __invoker_(__f.__invoker_), __policy_(__f.__policy_) {
680 __buf_.__large = __policy_->__clone(__f.__buf_.__large);
683 _LIBCPP_HIDE_FROM_ABI __policy_func(__policy_func&& __f)
684 : __buf_(__f.__buf_), __invoker_(__f.__invoker_), __policy_(__f.__policy_) {
686 __f.__policy_ = __policy::__create_empty();
687 __f.__invoker_ = __invoker();
696 _LIBCPP_HIDE_FROM_ABI __policy_func& operator=(__policy_func&& __f) {
698 __buf_ = __f.__buf_;
699 __invoker_ = __f.__invoker_;
700 __policy_ = __f.__policy_;
701 __f.__policy_ = __policy::__create_empty();
702 __f.__invoker_ = __invoker();
719 _LIBCPP_HIDE_FROM_ABI void swap(__policy_func& __f) {
720 std::swap(__invoker_, __f.__invoker_);
721 std::swap(__policy_, __f.__policy_);
722 std::swap(__buf_, __f.__buf_);
753 _LIBCPP_HIDE_FROM_ABI explicit __func(__block_type const& __f)
755 : __f_(__f)
757 : __f_(reinterpret_cast<__block_type>(__f ? _Block_copy(__f) : nullptr))
764 _LIBCPP_HIDE_FROM_ABI explicit __func(__block_type __f, const _Alloc& /* unused */)
766 : __f_(__f)
768 : __f_(reinterpret_cast<__block_type>(__f ? _Block_copy(__f) : nullptr))
872 _LIBCPP_HIDE_FROM_ABI function(allocator_arg_t, const _Alloc& __a, _Fp __f);
888 _LIBCPP_HIDE_FROM_ABI void assign(_Fp&& __f, const _Alloc& __a) {
889 function(allocator_arg, __a, std::forward<_Fp>(__f)).swap(*this);
927 function<_Rp(_ArgTypes...)>::function(const function& __f) : __f_(__f.__f_) {}
932 …p(_ArgTypes...)>::function(allocator_arg_t, const _Alloc&, const function& __f) : __f_(__f.__f_) {}
936 function<_Rp(_ArgTypes...)>::function(function&& __f) _NOEXCEPT : __f_(std::move(__f.__f_)) {}
941 …Types...)>::function(allocator_arg_t, const _Alloc&, function&& __f) : __f_(std::move(__f.__f_)) {}
946 function<_Rp(_ArgTypes...)>::function(_Fp __f) : __f_(std::move(__f)) {}
951 …ArgTypes...)>::function(allocator_arg_t, const _Alloc& __a, _Fp __f) : __f_(std::move(__f), __a) {}
955 function<_Rp(_ArgTypes...)>& function<_Rp(_ArgTypes...)>::operator=(const function& __f) {
956 function(__f).swap(*this);
961 function<_Rp(_ArgTypes...)>& function<_Rp(_ArgTypes...)>::operator=(function&& __f) _NOEXCEPT {
962 __f_ = std::move(__f.__f_);
974 function<_Rp(_ArgTypes...)>& function<_Rp(_ArgTypes...)>::operator=(_Fp&& __f) {
975 function(std::forward<_Fp>(__f)).swap(*this);
983 void function<_Rp(_ArgTypes...)>::swap(function& __f) _NOEXCEPT {
984 __f_.swap(__f.__f_);
1014 inline _LIBCPP_HIDE_FROM_ABI bool operator==(const function<_Rp(_ArgTypes...)>& __f, nullptr_t) _NO…
1015 return !__f;
1021 inline _LIBCPP_HIDE_FROM_ABI bool operator==(nullptr_t, const function<_Rp(_ArgTypes...)>& __f) _NO…
1022 return !__f;
1026 inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const function<_Rp(_ArgTypes...)>& __f, nullptr_t) _NO…
1027 return (bool)__f;
1031 inline _LIBCPP_HIDE_FROM_ABI bool operator!=(nullptr_t, const function<_Rp(_ArgTypes...)>& __f) _NO…
1032 return (bool)__f;