Lines Matching refs:__f
103 bool __not_null(function<_Fp> const& __f) { return !!__f; }
140 explicit __alloc_func(_Target&& __f)
141 : __f_(piecewise_construct, _VSTD::forward_as_tuple(_VSTD::move(__f)),
147 explicit __alloc_func(const _Target& __f, const _Alloc& __a)
148 : __f_(piecewise_construct, _VSTD::forward_as_tuple(__f),
154 explicit __alloc_func(const _Target& __f, _Alloc&& __a)
155 : __f_(piecewise_construct, _VSTD::forward_as_tuple(__f),
161 explicit __alloc_func(_Target&& __f, _Alloc&& __a)
162 : __f_(piecewise_construct, _VSTD::forward_as_tuple(_VSTD::move(__f)),
192 static void __destroy_and_delete(__alloc_func* __f) {
196 _FunAlloc __a(__f->__get_allocator());
197 __f->destroy();
198 __a.deallocate(__f, 1);
213 explicit __default_alloc_func(_Target&& __f) : __f_(_VSTD::move(__f)) {}
216 explicit __default_alloc_func(const _Target& __f) : __f_(__f) {}
237 static void __destroy_and_delete(__default_alloc_func* __f) {
238 __f->destroy();
239 __builtin_new_allocator::__deallocate_type<__default_alloc_func>(__f, 1);
277 explicit __func(_Fp&& __f)
278 : __f_(_VSTD::move(__f)) {}
281 explicit __func(const _Fp& __f, const _Alloc& __a)
282 : __f_(__f, __a) {}
285 explicit __func(const _Fp& __f, _Alloc&& __a)
286 : __f_(__f, _VSTD::move(__a)) {}
289 explicit __func(_Fp&& __f, _Alloc&& __a)
290 : __f_(_VSTD::move(__f), _VSTD::move(__a)) {}
389 _LIBCPP_INLINE_VISIBILITY __value_func(_Fp&& __f, const _Alloc& __a)
397 if (__function::__not_null(__f))
405 ::new ((void*)&__buf_) _Fun(_VSTD::move(__f), _Alloc(__af));
411 ::new ((void*)__hold.get()) _Fun(_VSTD::move(__f), _Alloc(__a));
419 _LIBCPP_INLINE_VISIBILITY explicit __value_func(_Fp&& __f)
420 : __value_func(_VSTD::forward<_Fp>(__f), allocator<_Fp>()) {}
423 __value_func(const __value_func& __f)
425 if (__f.__f_ == nullptr)
427 else if ((void*)__f.__f_ == &__f.__buf_)
430 __f.__f_->__clone(__f_);
433 __f_ = __f.__f_->__clone();
437 __value_func(__value_func&& __f) _NOEXCEPT
439 if (__f.__f_ == nullptr)
441 else if ((void*)__f.__f_ == &__f.__buf_)
444 __f.__f_->__clone(__f_);
448 __f_ = __f.__f_;
449 __f.__f_ = nullptr;
463 __value_func& operator=(__value_func&& __f)
466 if (__f.__f_ == nullptr)
468 else if ((void*)__f.__f_ == &__f.__buf_)
471 __f.__f_->__clone(__f_);
475 __f_ = __f.__f_;
476 __f.__f_ = nullptr;
484 __func* __f = __f_;
486 if ((void*)__f == &__buf_)
487 __f->destroy();
488 else if (__f)
489 __f->destroy_deallocate();
502 void swap(__value_func& __f) _NOEXCEPT
504 if (&__f == this)
506 if ((void*)__f_ == &__buf_ && (void*)__f.__f_ == &__f.__buf_)
513 __f.__f_->__clone(__as_base(&__buf_));
514 __f.__f_->destroy();
515 __f.__f_ = nullptr;
517 __t->__clone(__as_base(&__f.__buf_));
519 __f.__f_ = __as_base(&__f.__buf_);
523 __f_->__clone(__as_base(&__f.__buf_));
525 __f_ = __f.__f_;
526 __f.__f_ = __as_base(&__f.__buf_);
528 else if ((void*)__f.__f_ == &__f.__buf_)
530 __f.__f_->__clone(__as_base(&__buf_));
531 __f.__f_->destroy();
532 __f.__f_ = __f_;
536 _VSTD::swap(__f_, __f.__f_);
617 const _Fun* __f = static_cast<const _Fun*>(__s);
618 return __f->__clone();
699 _Fun* __f = reinterpret_cast<_Fun*>(__use_small_storage<_Fun>::value
702 return (*__f)(_VSTD::forward<_ArgTypes>(__args)...);
731 _LIBCPP_INLINE_VISIBILITY __policy_func(_Fp&& __f, const _Alloc& __a)
739 if (__function::__not_null(__f))
748 _Fun(_VSTD::move(__f), _Alloc(__af));
755 _Fun(_VSTD::move(__f), _Alloc(__af));
762 _LIBCPP_INLINE_VISIBILITY explicit __policy_func(_Fp&& __f)
766 if (__function::__not_null(__f)) {
770 ::new ((void*)&__buf_.__small) _Fun(_VSTD::move(__f));
774 __buf_.__large = ::new ((void*)__hold.get()) _Fun(_VSTD::move(__f));
781 __policy_func(const __policy_func& __f)
782 : __buf_(__f.__buf_), __invoker_(__f.__invoker_),
783 __policy_(__f.__policy_)
786 __buf_.__large = __policy_->__clone(__f.__buf_.__large);
790 __policy_func(__policy_func&& __f)
791 : __buf_(__f.__buf_), __invoker_(__f.__invoker_),
792 __policy_(__f.__policy_)
796 __f.__policy_ = __policy::__create_empty();
797 __f.__invoker_ = __invoker();
809 __policy_func& operator=(__policy_func&& __f)
812 __buf_ = __f.__buf_;
813 __invoker_ = __f.__invoker_;
814 __policy_ = __f.__policy_;
815 __f.__policy_ = __policy::__create_empty();
816 __f.__invoker_ = __invoker();
839 void swap(__policy_func& __f)
841 _VSTD::swap(__invoker_, __f.__invoker_);
842 _VSTD::swap(__policy_, __f.__policy_);
843 _VSTD::swap(__buf_, __f.__buf_);
886 explicit __func(__block_type const& __f)
887 : __f_(reinterpret_cast<__block_type>(__f ? _Block_copy(__f) : nullptr))
893 explicit __func(__block_type __f, const _Alloc& /* unused */)
894 : __f_(reinterpret_cast<__block_type>(__f ? _Block_copy(__f) : nullptr))
1003 function(allocator_arg_t, const _Alloc& __a, _Fp __f);
1020 void assign(_Fp&& __f, const _Alloc& __a)
1021 {function(allocator_arg, __a, _VSTD::forward<_Fp>(__f)).swap(*this);}
1095 function<_Rp(_ArgTypes...)>::function(const function& __f) : __f_(__f.__f_) {}
1101 const function& __f) : __f_(__f.__f_) {}
1105 function<_Rp(_ArgTypes...)>::function(function&& __f) _NOEXCEPT
1106 : __f_(_VSTD::move(__f.__f_)) {}
1112 function&& __f)
1113 : __f_(_VSTD::move(__f.__f_)) {}
1118 function<_Rp(_ArgTypes...)>::function(_Fp __f) : __f_(_VSTD::move(__f)) {}
1124 _Fp __f)
1125 : __f_(_VSTD::move(__f), __a) {}
1130 function<_Rp(_ArgTypes...)>::operator=(const function& __f)
1132 function(__f).swap(*this);
1138 function<_Rp(_ArgTypes...)>::operator=(function&& __f) _NOEXCEPT
1140 __f_ = _VSTD::move(__f.__f_);
1155 function<_Rp(_ArgTypes...)>::operator=(_Fp&& __f)
1157 function(_VSTD::forward<_Fp>(__f)).swap(*this);
1166 function<_Rp(_ArgTypes...)>::swap(function& __f) _NOEXCEPT
1168 __f_.swap(__f.__f_);
1208 operator==(const function<_Rp(_ArgTypes...)>& __f, nullptr_t) _NOEXCEPT {return !__f;}
1213 operator==(nullptr_t, const function<_Rp(_ArgTypes...)>& __f) _NOEXCEPT {return !__f;}
1218 operator!=(const function<_Rp(_ArgTypes...)>& __f, nullptr_t) _NOEXCEPT {return (bool)__f;}
1223 operator!=(nullptr_t, const function<_Rp(_ArgTypes...)>& __f) _NOEXCEPT {return (bool)__f;}
1321 explicit __func(_Fp __f) : __f_(_VSTD::move(__f), __default_init_tag()) {}
1322 explicit __func(_Fp __f, _Alloc __a) : __f_(_VSTD::move(__f), _VSTD::move(__a)) {}
1406 …_LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f) : __f_(_VSTD::move(__f), __default_init_tag()) …
1407 _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f, _Alloc __a)
1408 : __f_(_VSTD::move(__f), _VSTD::move(__a)) {}
1492 …_LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f) : __f_(_VSTD::move(__f), __default_init_tag()) …
1493 _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f, _Alloc __a)
1494 : __f_(_VSTD::move(__f), _VSTD::move(__a)) {}
1578 …_LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f) : __f_(_VSTD::move(__f), __default_init_tag()) …
1579 _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f, _Alloc __a)
1580 : __f_(_VSTD::move(__f), _VSTD::move(__a)) {}
1687 function(allocator_arg_t, const _Alloc& __a, _Fp __f,
1706 void assign(_Fp __f, const _Alloc& __a)
1707 {function(allocator_arg, __a, __f).swap(*this);}
1731 function<_Rp()>::function(const function& __f)
1733 if (__f.__f_ == 0)
1735 else if (__f.__f_ == (const __base*)&__f.__buf_)
1738 __f.__f_->__clone(__f_);
1741 __f_ = __f.__f_->__clone();
1746 function<_Rp()>::function(allocator_arg_t, const _Alloc&, const function& __f)
1748 if (__f.__f_ == 0)
1750 else if (__f.__f_ == (const __base*)&__f.__buf_)
1753 __f.__f_->__clone(__f_);
1756 __f_ = __f.__f_->__clone();
1761 function<_Rp()>::function(_Fp __f,
1765 if (__function::__not_null(__f))
1771 ::new ((void*)__f_) _FF(__f);
1779 ::new ((void*)__hold.get()) _FF(__f, allocator<_Fp>(__a));
1787 function<_Rp()>::function(allocator_arg_t, const _Alloc& __a0, _Fp __f,
1792 if (__function::__not_null(__f))
1798 ::new ((void*)__f_) _FF(__f, __a0);
1806 ::new ((void*)__hold.get()) _FF(__f, _Alloc(__a));
1814 function<_Rp()>::operator=(const function& __f)
1816 if (__f)
1817 function(__f).swap(*this);
1843 function<_Rp()>::operator=(_Fp __f)
1845 function(_VSTD::move(__f)).swap(*this);
1860 function<_Rp()>::swap(function& __f)
1862 if (_VSTD::addressof(__f) == this)
1864 if (__f_ == (__base*)&__buf_ && __f.__f_ == (__base*)&__f.__buf_)
1871 __f.__f_->__clone((__base*)&__buf_);
1872 __f.__f_->destroy();
1873 __f.__f_ = 0;
1875 __t->__clone((__base*)&__f.__buf_);
1877 __f.__f_ = (__base*)&__f.__buf_;
1881 __f_->__clone((__base*)&__f.__buf_);
1883 __f_ = __f.__f_;
1884 __f.__f_ = (__base*)&__f.__buf_;
1886 else if (__f.__f_ == (__base*)&__f.__buf_)
1888 __f.__f_->__clone((__base*)&__buf_);
1889 __f.__f_->destroy();
1890 __f.__f_ = __f_;
1894 _VSTD::swap(__f_, __f.__f_);
1967 function(allocator_arg_t, const _Alloc& __a, _Fp __f,
1986 void assign(_Fp __f, const _Alloc& __a)
1987 {function(allocator_arg, __a, __f).swap(*this);}
2011 function<_Rp(_A0)>::function(const function& __f)
2013 if (__f.__f_ == 0)
2015 else if (__f.__f_ == (const __base*)&__f.__buf_)
2018 __f.__f_->__clone(__f_);
2021 __f_ = __f.__f_->__clone();
2026 function<_Rp(_A0)>::function(allocator_arg_t, const _Alloc&, const function& __f)
2028 if (__f.__f_ == 0)
2030 else if (__f.__f_ == (const __base*)&__f.__buf_)
2033 __f.__f_->__clone(__f_);
2036 __f_ = __f.__f_->__clone();
2041 function<_Rp(_A0)>::function(_Fp __f,
2045 if (__function::__not_null(__f))
2051 ::new ((void*)__f_) _FF(__f);
2059 ::new ((void*)__hold.get()) _FF(__f, allocator<_Fp>(__a));
2067 function<_Rp(_A0)>::function(allocator_arg_t, const _Alloc& __a0, _Fp __f,
2072 if (__function::__not_null(__f))
2078 ::new ((void*)__f_) _FF(__f, __a0);
2086 ::new ((void*)__hold.get()) _FF(__f, _Alloc(__a));
2094 function<_Rp(_A0)>::operator=(const function& __f)
2096 if (__f)
2097 function(__f).swap(*this);
2123 function<_Rp(_A0)>::operator=(_Fp __f)
2125 function(_VSTD::move(__f)).swap(*this);
2140 function<_Rp(_A0)>::swap(function& __f)
2142 if (_VSTD::addressof(__f) == this)
2144 if (__f_ == (__base*)&__buf_ && __f.__f_ == (__base*)&__f.__buf_)
2151 __f.__f_->__clone((__base*)&__buf_);
2152 __f.__f_->destroy();
2153 __f.__f_ = 0;
2155 __t->__clone((__base*)&__f.__buf_);
2157 __f.__f_ = (__base*)&__f.__buf_;
2161 __f_->__clone((__base*)&__f.__buf_);
2163 __f_ = __f.__f_;
2164 __f.__f_ = (__base*)&__f.__buf_;
2166 else if (__f.__f_ == (__base*)&__f.__buf_)
2168 __f.__f_->__clone((__base*)&__buf_);
2169 __f.__f_->destroy();
2170 __f.__f_ = __f_;
2174 _VSTD::swap(__f_, __f.__f_);
2247 function(allocator_arg_t, const _Alloc& __a, _Fp __f,
2266 void assign(_Fp __f, const _Alloc& __a)
2267 {function(allocator_arg, __a, __f).swap(*this);}
2291 function<_Rp(_A0, _A1)>::function(const function& __f)
2293 if (__f.__f_ == 0)
2295 else if (__f.__f_ == (const __base*)&__f.__buf_)
2298 __f.__f_->__clone(__f_);
2301 __f_ = __f.__f_->__clone();
2306 function<_Rp(_A0, _A1)>::function(allocator_arg_t, const _Alloc&, const function& __f)
2308 if (__f.__f_ == 0)
2310 else if (__f.__f_ == (const __base*)&__f.__buf_)
2313 __f.__f_->__clone(__f_);
2316 __f_ = __f.__f_->__clone();
2321 function<_Rp(_A0, _A1)>::function(_Fp __f,
2325 if (__function::__not_null(__f))
2331 ::new ((void*)__f_) _FF(__f);
2339 ::new ((void*)__hold.get()) _FF(__f, allocator<_Fp>(__a));
2347 function<_Rp(_A0, _A1)>::function(allocator_arg_t, const _Alloc& __a0, _Fp __f,
2352 if (__function::__not_null(__f))
2358 ::new ((void*)__f_) _FF(__f, __a0);
2366 ::new ((void*)__hold.get()) _FF(__f, _Alloc(__a));
2374 function<_Rp(_A0, _A1)>::operator=(const function& __f)
2376 if (__f)
2377 function(__f).swap(*this);
2403 function<_Rp(_A0, _A1)>::operator=(_Fp __f)
2405 function(_VSTD::move(__f)).swap(*this);
2420 function<_Rp(_A0, _A1)>::swap(function& __f)
2422 if (_VSTD::addressof(__f) == this)
2424 if (__f_ == (__base*)&__buf_ && __f.__f_ == (__base*)&__f.__buf_)
2431 __f.__f_->__clone((__base*)&__buf_);
2432 __f.__f_->destroy();
2433 __f.__f_ = 0;
2435 __t->__clone((__base*)&__f.__buf_);
2437 __f.__f_ = (__base*)&__f.__buf_;
2441 __f_->__clone((__base*)&__f.__buf_);
2443 __f_ = __f.__f_;
2444 __f.__f_ = (__base*)&__f.__buf_;
2446 else if (__f.__f_ == (__base*)&__f.__buf_)
2448 __f.__f_->__clone((__base*)&__buf_);
2449 __f.__f_->destroy();
2450 __f.__f_ = __f_;
2454 _VSTD::swap(__f_, __f.__f_);
2526 function(allocator_arg_t, const _Alloc& __a, _Fp __f,
2545 void assign(_Fp __f, const _Alloc& __a)
2546 {function(allocator_arg, __a, __f).swap(*this);}
2570 function<_Rp(_A0, _A1, _A2)>::function(const function& __f)
2572 if (__f.__f_ == 0)
2574 else if (__f.__f_ == (const __base*)&__f.__buf_)
2577 __f.__f_->__clone(__f_);
2580 __f_ = __f.__f_->__clone();
2586 const function& __f)
2588 if (__f.__f_ == 0)
2590 else if (__f.__f_ == (const __base*)&__f.__buf_)
2593 __f.__f_->__clone(__f_);
2596 __f_ = __f.__f_->__clone();
2601 function<_Rp(_A0, _A1, _A2)>::function(_Fp __f,
2605 if (__function::__not_null(__f))
2611 ::new ((void*)__f_) _FF(__f);
2619 ::new ((void*)__hold.get()) _FF(__f, allocator<_Fp>(__a));
2627 function<_Rp(_A0, _A1, _A2)>::function(allocator_arg_t, const _Alloc& __a0, _Fp __f,
2632 if (__function::__not_null(__f))
2638 ::new ((void*)__f_) _FF(__f, __a0);
2646 ::new ((void*)__hold.get()) _FF(__f, _Alloc(__a));
2654 function<_Rp(_A0, _A1, _A2)>::operator=(const function& __f)
2656 if (__f)
2657 function(__f).swap(*this);
2683 function<_Rp(_A0, _A1, _A2)>::operator=(_Fp __f)
2685 function(_VSTD::move(__f)).swap(*this);
2700 function<_Rp(_A0, _A1, _A2)>::swap(function& __f)
2702 if (_VSTD::addressof(__f) == this)
2704 if (__f_ == (__base*)&__buf_ && __f.__f_ == (__base*)&__f.__buf_)
2711 __f.__f_->__clone((__base*)&__buf_);
2712 __f.__f_->destroy();
2713 __f.__f_ = 0;
2715 __t->__clone((__base*)&__f.__buf_);
2717 __f.__f_ = (__base*)&__f.__buf_;
2721 __f_->__clone((__base*)&__f.__buf_);
2723 __f_ = __f.__f_;
2724 __f.__f_ = (__base*)&__f.__buf_;
2726 else if (__f.__f_ == (__base*)&__f.__buf_)
2728 __f.__f_->__clone((__base*)&__buf_);
2729 __f.__f_->destroy();
2730 __f.__f_ = __f_;
2734 _VSTD::swap(__f_, __f.__f_);
2782 operator==(const function<_Fp>& __f, nullptr_t) {return !__f;}
2787 operator==(nullptr_t, const function<_Fp>& __f) {return !__f;}
2792 operator!=(const function<_Fp>& __f, nullptr_t) {return (bool)__f;}
2797 operator!=(nullptr_t, const function<_Fp>& __f) {return (bool)__f;}