Lines Matching refs:__f

117 bool __not_null(function<_Fp> const& __f) { return !!__f; }
154 explicit __alloc_func(_Target&& __f)
155 : __f_(piecewise_construct, _VSTD::forward_as_tuple(_VSTD::move(__f)),
161 explicit __alloc_func(const _Target& __f, const _Alloc& __a)
162 : __f_(piecewise_construct, _VSTD::forward_as_tuple(__f),
168 explicit __alloc_func(const _Target& __f, _Alloc&& __a)
169 : __f_(piecewise_construct, _VSTD::forward_as_tuple(__f),
175 explicit __alloc_func(_Target&& __f, _Alloc&& __a)
176 : __f_(piecewise_construct, _VSTD::forward_as_tuple(_VSTD::move(__f)),
206 static void __destroy_and_delete(__alloc_func* __f) {
210 _FunAlloc __a(__f->__get_allocator());
211 __f->destroy();
212 __a.deallocate(__f, 1);
227 explicit __default_alloc_func(_Target&& __f) : __f_(_VSTD::move(__f)) {}
230 explicit __default_alloc_func(const _Target& __f) : __f_(__f) {}
251 static void __destroy_and_delete(__default_alloc_func* __f) {
252 __f->destroy();
253 __builtin_new_allocator::__deallocate_type<__default_alloc_func>(__f, 1);
291 explicit __func(_Fp&& __f)
292 : __f_(_VSTD::move(__f)) {}
295 explicit __func(const _Fp& __f, const _Alloc& __a)
296 : __f_(__f, __a) {}
299 explicit __func(const _Fp& __f, _Alloc&& __a)
300 : __f_(__f, _VSTD::move(__a)) {}
303 explicit __func(_Fp&& __f, _Alloc&& __a)
304 : __f_(_VSTD::move(__f), _VSTD::move(__a)) {}
403 _LIBCPP_INLINE_VISIBILITY __value_func(_Fp&& __f, const _Alloc& __a)
411 if (__function::__not_null(__f))
419 ::new ((void*)&__buf_) _Fun(_VSTD::move(__f), _Alloc(__af));
425 ::new ((void*)__hold.get()) _Fun(_VSTD::move(__f), _Alloc(__a));
433 _LIBCPP_INLINE_VISIBILITY explicit __value_func(_Fp&& __f)
434 : __value_func(_VSTD::forward<_Fp>(__f), allocator<_Fp>()) {}
437 __value_func(const __value_func& __f)
439 if (__f.__f_ == nullptr)
441 else if ((void*)__f.__f_ == &__f.__buf_)
444 __f.__f_->__clone(__f_);
447 __f_ = __f.__f_->__clone();
451 __value_func(__value_func&& __f) _NOEXCEPT
453 if (__f.__f_ == nullptr)
455 else if ((void*)__f.__f_ == &__f.__buf_)
458 __f.__f_->__clone(__f_);
462 __f_ = __f.__f_;
463 __f.__f_ = nullptr;
477 __value_func& operator=(__value_func&& __f)
480 if (__f.__f_ == nullptr)
482 else if ((void*)__f.__f_ == &__f.__buf_)
485 __f.__f_->__clone(__f_);
489 __f_ = __f.__f_;
490 __f.__f_ = nullptr;
498 __func* __f = __f_;
500 if ((void*)__f == &__buf_)
501 __f->destroy();
502 else if (__f)
503 __f->destroy_deallocate();
516 void swap(__value_func& __f) _NOEXCEPT
518 if (&__f == this)
520 if ((void*)__f_ == &__buf_ && (void*)__f.__f_ == &__f.__buf_)
527 __f.__f_->__clone(__as_base(&__buf_));
528 __f.__f_->destroy();
529 __f.__f_ = nullptr;
531 __t->__clone(__as_base(&__f.__buf_));
533 __f.__f_ = __as_base(&__f.__buf_);
537 __f_->__clone(__as_base(&__f.__buf_));
539 __f_ = __f.__f_;
540 __f.__f_ = __as_base(&__f.__buf_);
542 else if ((void*)__f.__f_ == &__f.__buf_)
544 __f.__f_->__clone(__as_base(&__buf_));
545 __f.__f_->destroy();
546 __f.__f_ = __f_;
550 _VSTD::swap(__f_, __f.__f_);
631 const _Fun* __f = static_cast<const _Fun*>(__s);
632 return __f->__clone();
713 _Fun* __f = reinterpret_cast<_Fun*>(__use_small_storage<_Fun>::value
716 return (*__f)(_VSTD::forward<_ArgTypes>(__args)...);
745 _LIBCPP_INLINE_VISIBILITY __policy_func(_Fp&& __f, const _Alloc& __a)
753 if (__function::__not_null(__f))
762 _Fun(_VSTD::move(__f), _Alloc(__af));
769 _Fun(_VSTD::move(__f), _Alloc(__af));
776 _LIBCPP_INLINE_VISIBILITY explicit __policy_func(_Fp&& __f)
780 if (__function::__not_null(__f)) {
784 ::new ((void*)&__buf_.__small) _Fun(_VSTD::move(__f));
788 __buf_.__large = ::new ((void*)__hold.get()) _Fun(_VSTD::move(__f));
795 __policy_func(const __policy_func& __f)
796 : __buf_(__f.__buf_), __invoker_(__f.__invoker_),
797 __policy_(__f.__policy_)
800 __buf_.__large = __policy_->__clone(__f.__buf_.__large);
804 __policy_func(__policy_func&& __f)
805 : __buf_(__f.__buf_), __invoker_(__f.__invoker_),
806 __policy_(__f.__policy_)
810 __f.__policy_ = __policy::__create_empty();
811 __f.__invoker_ = __invoker();
823 __policy_func& operator=(__policy_func&& __f)
826 __buf_ = __f.__buf_;
827 __invoker_ = __f.__invoker_;
828 __policy_ = __f.__policy_;
829 __f.__policy_ = __policy::__create_empty();
830 __f.__invoker_ = __invoker();
853 void swap(__policy_func& __f)
855 _VSTD::swap(__invoker_, __f.__invoker_);
856 _VSTD::swap(__policy_, __f.__policy_);
857 _VSTD::swap(__buf_, __f.__buf_);
900 explicit __func(__block_type const& __f)
902 : __f_(__f)
904 : __f_(reinterpret_cast<__block_type>(__f ? _Block_copy(__f) : nullptr))
911 explicit __func(__block_type __f, const _Alloc& /* unused */)
913 : __f_(__f)
915 : __f_(reinterpret_cast<__block_type>(__f ? _Block_copy(__f) : nullptr))
1025 function(allocator_arg_t, const _Alloc& __a, _Fp __f);
1042 void assign(_Fp&& __f, const _Alloc& __a)
1043 {function(allocator_arg, __a, _VSTD::forward<_Fp>(__f)).swap(*this);}
1117 function<_Rp(_ArgTypes...)>::function(const function& __f) : __f_(__f.__f_) {}
1123 const function& __f) : __f_(__f.__f_) {}
1127 function<_Rp(_ArgTypes...)>::function(function&& __f) _NOEXCEPT
1128 : __f_(_VSTD::move(__f.__f_)) {}
1134 function&& __f)
1135 : __f_(_VSTD::move(__f.__f_)) {}
1140 function<_Rp(_ArgTypes...)>::function(_Fp __f) : __f_(_VSTD::move(__f)) {}
1146 _Fp __f)
1147 : __f_(_VSTD::move(__f), __a) {}
1152 function<_Rp(_ArgTypes...)>::operator=(const function& __f)
1154 function(__f).swap(*this);
1160 function<_Rp(_ArgTypes...)>::operator=(function&& __f) _NOEXCEPT
1162 __f_ = _VSTD::move(__f.__f_);
1177 function<_Rp(_ArgTypes...)>::operator=(_Fp&& __f)
1179 function(_VSTD::forward<_Fp>(__f)).swap(*this);
1188 function<_Rp(_ArgTypes...)>::swap(function& __f) _NOEXCEPT
1190 __f_.swap(__f.__f_);
1230 operator==(const function<_Rp(_ArgTypes...)>& __f, nullptr_t) _NOEXCEPT {return !__f;}
1235 operator==(nullptr_t, const function<_Rp(_ArgTypes...)>& __f) _NOEXCEPT {return !__f;}
1240 operator!=(const function<_Rp(_ArgTypes...)>& __f, nullptr_t) _NOEXCEPT {return (bool)__f;}
1245 operator!=(nullptr_t, const function<_Rp(_ArgTypes...)>& __f) _NOEXCEPT {return (bool)__f;}
1343 explicit __func(_Fp __f) : __f_(_VSTD::move(__f), __default_init_tag()) {}
1344 explicit __func(_Fp __f, _Alloc __a) : __f_(_VSTD::move(__f), _VSTD::move(__a)) {}
1428 …_LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f) : __f_(_VSTD::move(__f), __default_init_tag()) …
1429 _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f, _Alloc __a)
1430 : __f_(_VSTD::move(__f), _VSTD::move(__a)) {}
1514 …_LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f) : __f_(_VSTD::move(__f), __default_init_tag()) …
1515 _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f, _Alloc __a)
1516 : __f_(_VSTD::move(__f), _VSTD::move(__a)) {}
1600 …_LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f) : __f_(_VSTD::move(__f), __default_init_tag()) …
1601 _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f, _Alloc __a)
1602 : __f_(_VSTD::move(__f), _VSTD::move(__a)) {}
1709 function(allocator_arg_t, const _Alloc& __a, _Fp __f,
1728 void assign(_Fp __f, const _Alloc& __a)
1729 {function(allocator_arg, __a, __f).swap(*this);}
1751 function<_Rp()>::function(const function& __f)
1753 if (__f.__f_ == 0)
1755 else if (__f.__f_ == (const __base*)&__f.__buf_)
1758 __f.__f_->__clone(__f_);
1761 __f_ = __f.__f_->__clone();
1766 function<_Rp()>::function(allocator_arg_t, const _Alloc&, const function& __f)
1768 if (__f.__f_ == 0)
1770 else if (__f.__f_ == (const __base*)&__f.__buf_)
1773 __f.__f_->__clone(__f_);
1776 __f_ = __f.__f_->__clone();
1781 function<_Rp()>::function(_Fp __f,
1785 if (__function::__not_null(__f))
1791 ::new ((void*)__f_) _FF(__f);
1799 ::new ((void*)__hold.get()) _FF(__f, allocator<_Fp>(__a));
1807 function<_Rp()>::function(allocator_arg_t, const _Alloc& __a0, _Fp __f,
1812 if (__function::__not_null(__f))
1818 ::new ((void*)__f_) _FF(__f, __a0);
1826 ::new ((void*)__hold.get()) _FF(__f, _Alloc(__a));
1834 function<_Rp()>::operator=(const function& __f)
1836 if (__f)
1837 function(__f).swap(*this);
1863 function<_Rp()>::operator=(_Fp __f)
1865 function(_VSTD::move(__f)).swap(*this);
1880 function<_Rp()>::swap(function& __f)
1882 if (_VSTD::addressof(__f) == this)
1884 if (__f_ == (__base*)&__buf_ && __f.__f_ == (__base*)&__f.__buf_)
1891 __f.__f_->__clone((__base*)&__buf_);
1892 __f.__f_->destroy();
1893 __f.__f_ = 0;
1895 __t->__clone((__base*)&__f.__buf_);
1897 __f.__f_ = (__base*)&__f.__buf_;
1901 __f_->__clone((__base*)&__f.__buf_);
1903 __f_ = __f.__f_;
1904 __f.__f_ = (__base*)&__f.__buf_;
1906 else if (__f.__f_ == (__base*)&__f.__buf_)
1908 __f.__f_->__clone((__base*)&__buf_);
1909 __f.__f_->destroy();
1910 __f.__f_ = __f_;
1914 _VSTD::swap(__f_, __f.__f_);
1987 function(allocator_arg_t, const _Alloc& __a, _Fp __f,
2006 void assign(_Fp __f, const _Alloc& __a)
2007 {function(allocator_arg, __a, __f).swap(*this);}
2029 function<_Rp(_A0)>::function(const function& __f)
2031 if (__f.__f_ == 0)
2033 else if (__f.__f_ == (const __base*)&__f.__buf_)
2036 __f.__f_->__clone(__f_);
2039 __f_ = __f.__f_->__clone();
2044 function<_Rp(_A0)>::function(allocator_arg_t, const _Alloc&, const function& __f)
2046 if (__f.__f_ == 0)
2048 else if (__f.__f_ == (const __base*)&__f.__buf_)
2051 __f.__f_->__clone(__f_);
2054 __f_ = __f.__f_->__clone();
2059 function<_Rp(_A0)>::function(_Fp __f,
2063 if (__function::__not_null(__f))
2069 ::new ((void*)__f_) _FF(__f);
2077 ::new ((void*)__hold.get()) _FF(__f, allocator<_Fp>(__a));
2085 function<_Rp(_A0)>::function(allocator_arg_t, const _Alloc& __a0, _Fp __f,
2090 if (__function::__not_null(__f))
2096 ::new ((void*)__f_) _FF(__f, __a0);
2104 ::new ((void*)__hold.get()) _FF(__f, _Alloc(__a));
2112 function<_Rp(_A0)>::operator=(const function& __f)
2114 if (__f)
2115 function(__f).swap(*this);
2141 function<_Rp(_A0)>::operator=(_Fp __f)
2143 function(_VSTD::move(__f)).swap(*this);
2158 function<_Rp(_A0)>::swap(function& __f)
2160 if (_VSTD::addressof(__f) == this)
2162 if (__f_ == (__base*)&__buf_ && __f.__f_ == (__base*)&__f.__buf_)
2169 __f.__f_->__clone((__base*)&__buf_);
2170 __f.__f_->destroy();
2171 __f.__f_ = 0;
2173 __t->__clone((__base*)&__f.__buf_);
2175 __f.__f_ = (__base*)&__f.__buf_;
2179 __f_->__clone((__base*)&__f.__buf_);
2181 __f_ = __f.__f_;
2182 __f.__f_ = (__base*)&__f.__buf_;
2184 else if (__f.__f_ == (__base*)&__f.__buf_)
2186 __f.__f_->__clone((__base*)&__buf_);
2187 __f.__f_->destroy();
2188 __f.__f_ = __f_;
2192 _VSTD::swap(__f_, __f.__f_);
2265 function(allocator_arg_t, const _Alloc& __a, _Fp __f,
2284 void assign(_Fp __f, const _Alloc& __a)
2285 {function(allocator_arg, __a, __f).swap(*this);}
2307 function<_Rp(_A0, _A1)>::function(const function& __f)
2309 if (__f.__f_ == 0)
2311 else if (__f.__f_ == (const __base*)&__f.__buf_)
2314 __f.__f_->__clone(__f_);
2317 __f_ = __f.__f_->__clone();
2322 function<_Rp(_A0, _A1)>::function(allocator_arg_t, const _Alloc&, const function& __f)
2324 if (__f.__f_ == 0)
2326 else if (__f.__f_ == (const __base*)&__f.__buf_)
2329 __f.__f_->__clone(__f_);
2332 __f_ = __f.__f_->__clone();
2337 function<_Rp(_A0, _A1)>::function(_Fp __f,
2341 if (__function::__not_null(__f))
2347 ::new ((void*)__f_) _FF(__f);
2355 ::new ((void*)__hold.get()) _FF(__f, allocator<_Fp>(__a));
2363 function<_Rp(_A0, _A1)>::function(allocator_arg_t, const _Alloc& __a0, _Fp __f,
2368 if (__function::__not_null(__f))
2374 ::new ((void*)__f_) _FF(__f, __a0);
2382 ::new ((void*)__hold.get()) _FF(__f, _Alloc(__a));
2390 function<_Rp(_A0, _A1)>::operator=(const function& __f)
2392 if (__f)
2393 function(__f).swap(*this);
2419 function<_Rp(_A0, _A1)>::operator=(_Fp __f)
2421 function(_VSTD::move(__f)).swap(*this);
2436 function<_Rp(_A0, _A1)>::swap(function& __f)
2438 if (_VSTD::addressof(__f) == this)
2440 if (__f_ == (__base*)&__buf_ && __f.__f_ == (__base*)&__f.__buf_)
2447 __f.__f_->__clone((__base*)&__buf_);
2448 __f.__f_->destroy();
2449 __f.__f_ = 0;
2451 __t->__clone((__base*)&__f.__buf_);
2453 __f.__f_ = (__base*)&__f.__buf_;
2457 __f_->__clone((__base*)&__f.__buf_);
2459 __f_ = __f.__f_;
2460 __f.__f_ = (__base*)&__f.__buf_;
2462 else if (__f.__f_ == (__base*)&__f.__buf_)
2464 __f.__f_->__clone((__base*)&__buf_);
2465 __f.__f_->destroy();
2466 __f.__f_ = __f_;
2470 _VSTD::swap(__f_, __f.__f_);
2542 function(allocator_arg_t, const _Alloc& __a, _Fp __f,
2561 void assign(_Fp __f, const _Alloc& __a)
2562 {function(allocator_arg, __a, __f).swap(*this);}
2584 function<_Rp(_A0, _A1, _A2)>::function(const function& __f)
2586 if (__f.__f_ == 0)
2588 else if (__f.__f_ == (const __base*)&__f.__buf_)
2591 __f.__f_->__clone(__f_);
2594 __f_ = __f.__f_->__clone();
2600 const function& __f)
2602 if (__f.__f_ == 0)
2604 else if (__f.__f_ == (const __base*)&__f.__buf_)
2607 __f.__f_->__clone(__f_);
2610 __f_ = __f.__f_->__clone();
2615 function<_Rp(_A0, _A1, _A2)>::function(_Fp __f,
2619 if (__function::__not_null(__f))
2625 ::new ((void*)__f_) _FF(__f);
2633 ::new ((void*)__hold.get()) _FF(__f, allocator<_Fp>(__a));
2641 function<_Rp(_A0, _A1, _A2)>::function(allocator_arg_t, const _Alloc& __a0, _Fp __f,
2646 if (__function::__not_null(__f))
2652 ::new ((void*)__f_) _FF(__f, __a0);
2660 ::new ((void*)__hold.get()) _FF(__f, _Alloc(__a));
2668 function<_Rp(_A0, _A1, _A2)>::operator=(const function& __f)
2670 if (__f)
2671 function(__f).swap(*this);
2697 function<_Rp(_A0, _A1, _A2)>::operator=(_Fp __f)
2699 function(_VSTD::move(__f)).swap(*this);
2714 function<_Rp(_A0, _A1, _A2)>::swap(function& __f)
2716 if (_VSTD::addressof(__f) == this)
2718 if (__f_ == (__base*)&__buf_ && __f.__f_ == (__base*)&__f.__buf_)
2725 __f.__f_->__clone((__base*)&__buf_);
2726 __f.__f_->destroy();
2727 __f.__f_ = 0;
2729 __t->__clone((__base*)&__f.__buf_);
2731 __f.__f_ = (__base*)&__f.__buf_;
2735 __f_->__clone((__base*)&__f.__buf_);
2737 __f_ = __f.__f_;
2738 __f.__f_ = (__base*)&__f.__buf_;
2740 else if (__f.__f_ == (__base*)&__f.__buf_)
2742 __f.__f_->__clone((__base*)&__buf_);
2743 __f.__f_->destroy();
2744 __f.__f_ = __f_;
2748 _VSTD::swap(__f_, __f.__f_);
2796 operator==(const function<_Fp>& __f, nullptr_t) {return !__f;}
2801 operator==(nullptr_t, const function<_Fp>& __f) {return !__f;}
2806 operator!=(const function<_Fp>& __f, nullptr_t) {return (bool)__f;}
2811 operator!=(nullptr_t, const function<_Fp>& __f) {return (bool)__f;}