Home | History | Annotate | Download | only in base

Lines Matching refs:Args

44 //  (Bound)Args -- A set of types that stores the arguments.
76 template <typename T, typename... Args>
77 struct HasNonConstReferenceItem<TypeList<T, Args...>>
80 HasNonConstReferenceItem<TypeList<Args...>>>::type {};
82 // HasRefCountedTypeAsRawPtr selects true_type when any of the |Args| is a raw
86 template <typename... Args>
92 template <typename T, typename... Args>
93 struct HasRefCountedTypeAsRawPtr<T, Args...>
96 HasRefCountedTypeAsRawPtr<Args...>>::type {};
99 // item of |Args| is an array type.
103 template <bool is_method, typename... Args>
106 template <typename T, typename... Args>
107 struct BindsArrayToFirstArg<true, T, Args...> : std::is_array<T> {};
114 template <bool is_method, typename... Args>
115 struct HasRefCountedParamAsRawPtr : HasRefCountedTypeAsRawPtr<Args...> {};
117 template <typename T, typename... Args>
118 struct HasRefCountedParamAsRawPtr<true, T, Args...>
119 : HasRefCountedTypeAsRawPtr<Args...> {};
145 template <typename R, typename... Args>
146 class RunnableAdapter<R(*)(Args...)> {
150 typedef R RunType(Args...);
152 explicit RunnableAdapter(R(*function)(Args...))
156 R Run(typename CallbackParamTraits<Args>::ForwardType... args) {
157 return function_(CallbackForward(args)...);
161 R (*function_)(Args...);
165 template <typename R, typename T, typename... Args>
166 class RunnableAdapter<R(T::*)(Args...)> {
170 typedef R RunType(T*, Args...);
173 explicit RunnableAdapter(R(T::*method)(Args...))
177 R Run(T* object, typename CallbackParamTraits<Args>::ForwardType... args) {
178 return (object->*method_)(CallbackForward(args)...);
182 R (T::*method_)(Args...);
186 template <typename R, typename T, typename... Args>
187 class RunnableAdapter<R(T::*)(Args...) const> {
189 using RunType = R(const T*, Args...);
192 explicit RunnableAdapter(R(T::*method)(Args...) const)
197 typename CallbackParamTraits<Args>::ForwardType... args) {
198 return (object->*method_)(CallbackForward(args)...);
202 R (T::*method_)(Args...) const;
212 template <typename R, typename... Args>
213 struct ForceVoidReturn<R(Args...)> {
216 typedef void RunType(Args...);
287 template <typename ReturnType, typename Runnable, typename... Args>
288 struct InvokeHelper<false, ReturnType, Runnable, TypeList<Args...>> {
289 static ReturnType MakeItSo(Runnable runnable, Args... args) {
290 return runnable.Run(CallbackForward(args)...);
294 template <typename Runnable, typename... Args>
295 struct InvokeHelper<false, void, Runnable, TypeList<Args...>> {
296 static void MakeItSo(Runnable runnable, Args... args) {
297 runnable.Run(CallbackForward(args)...);
301 template <typename Runnable, typename BoundWeakPtr, typename... Args>
302 struct InvokeHelper<true, void, Runnable, TypeList<BoundWeakPtr, Args...>> {
303 static void MakeItSo(Runnable runnable, BoundWeakPtr weak_ptr, Args... args) {
307 runnable.Run(weak_ptr.get(), CallbackForward(args)...);
371 typename... Args,
373 struct BindState<Runnable, R(Args...), BoundArgs...> final
376 using StorageType = BindState<Runnable, R(Args...), BoundArgs...>;
388 TypeList<typename CallbackParamTraits<Args>::ForwardType...>>;
397 using UnboundArgs = DropTypeListItem<sizeof...(BoundArgs), TypeList<Args...>>;