Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qobjectdefs_impl.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// Copyright (C) 2013 Olivier Goffart <ogoffart@woboq.com>
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4// Qt-Security score:significant reason:default
5
6#ifndef QOBJECTDEFS_H
7#error Do not include qobjectdefs_impl.h directly
8#include <QtCore/qnamespace.h>
9#endif
10
11#if 0
12#pragma qt_sync_skip_header_check
13#pragma qt_sync_stop_processing
14#endif
15
16#include <QtCore/qfunctionaltools_impl.h>
17
18#include <memory>
19
20QT_BEGIN_NAMESPACE
21class QObject;
22class QObjectPrivate;
23class QMetaMethod;
24class QByteArray;
25
26namespace QtPrivate {
27 template <typename T> struct RemoveRef { typedef T Type; };
28 template <typename T> struct RemoveRef<T&> { typedef T Type; };
29 template <typename T> struct RemoveConstRef { typedef T Type; };
30 template <typename T> struct RemoveConstRef<const T&> { typedef T Type; };
31
32 /*
33 The following List classes are used to help to handle the list of arguments.
34 It follow the same principles as the lisp lists.
35 List_Left<L,N> take a list and a number as a parameter and returns (via the Value typedef,
36 the list composed of the first N element of the list
37 */
38 // With variadic template, lists are represented using a variadic template argument instead of the lisp way
39 template <typename... Ts> struct List { static constexpr size_t size = sizeof...(Ts); };
40 template<typename T> struct SizeOfList { static constexpr size_t value = 1; };
41 template<> struct SizeOfList<List<>> { static constexpr size_t value = 0; };
42 template<typename ...Ts> struct SizeOfList<List<Ts...>> { static constexpr size_t value = List<Ts...>::size; };
43 template <typename Head, typename... Tail> struct List<Head, Tail...> {
44 static constexpr size_t size = 1 + sizeof...(Tail);
45 typedef Head Car; typedef List<Tail...> Cdr;
46 };
47 template <typename, typename> struct List_Append;
48 template <typename... L1, typename...L2> struct List_Append<List<L1...>, List<L2...>> { typedef List<L1..., L2...> Value; };
49 template <typename L, int N> struct List_Left {
50 typedef typename List_Append<List<typename L::Car>,typename List_Left<typename L::Cdr, N - 1>::Value>::Value Value;
51 };
52 template <typename L> struct List_Left<L, 0> { typedef List<> Value; };
53
54 /*
55 This is used to store the return value from a slot, whether the caller
56 wants to store this value (QMetaObject::invokeMethod() with
57 qReturnArg() or non-void signal ) or not.
58 */
60 {
61 template <typename R, typename Lambda>
62 static void call_internal([[maybe_unused]] void **args, Lambda &&fn)
64 {
65 if constexpr (std::is_void_v<R> || std::is_void_v<std::invoke_result_t<Lambda>>) {
66 std::forward<Lambda>(fn)();
67 } else {
68 if (args[0])
69 *reinterpret_cast<R *>(args[0]) = std::forward<Lambda>(fn)();
70 else
71 [[maybe_unused]] auto r = std::forward<Lambda>(fn)();
72 }
73 }
74 };
75
76 /*
77 The FunctionPointer<Func> struct is a type trait for function pointer.
78 - ArgumentCount is the number of argument, or -1 if it is unknown
79 - the Object typedef is the Object of a pointer to member function
80 - the Arguments typedef is the list of argument (in a QtPrivate::List)
81 - the Function typedef is an alias to the template parameter Func
82 - the call<Args, R>(f,o,args) method is used to call that slot
83 Args is the list of argument of the signal
84 R is the return type of the signal
85 f is the function pointer
86 o is the receiver object
87 and args is the array of pointer to arguments, as used in qt_metacall
88
89 The Functor<Func,N> struct is the helper to call a functor of N argument.
90 Its call function is the same as the FunctionPointer::call function.
91 */
92 template<typename Func> struct FunctionPointer { enum {ArgumentCount = -1, IsPointerToMemberFunction = false}; };
93
94 template<typename ObjPrivate> inline void assertObjectType(QObjectPrivate *d);
95 template<typename Obj> inline void assertObjectType(QObject *o)
96 {
97 // ensure all three compile
98 [[maybe_unused]] auto staticcast = [](QObject *obj) { return static_cast<Obj *>(obj); };
99 [[maybe_unused]] auto qobjcast = [](QObject *obj) { return Obj::staticMetaObject.cast(obj); };
100#ifdef __cpp_rtti
101 [[maybe_unused]] auto dyncast = [](QObject *obj) { return dynamic_cast<Obj *>(obj); };
102 auto cast = dyncast;
103#else
104 auto cast = qobjcast;
105#endif
106 Q_ASSERT_X(cast(o), Obj::staticMetaObject.className(),
107 "Called object is not of the correct type (class destructor may have already run)");
108 }
109
110 template <typename, typename, typename, typename> struct FunctorCall;
111 template <size_t... II, typename... SignalArgs, typename R, typename Function>
113 {
114 static void call(Function &f, void **arg)
115 {
116 call_internal<R>(arg, [&] {
117 return f((*reinterpret_cast<typename RemoveRef<SignalArgs>::Type *>(arg[II+1]))...);
118 });
119 }
120 };
121 template <size_t... II, typename... SignalArgs, typename R, typename... SlotArgs, typename SlotRet, class Obj>
123 {
124 static void call(SlotRet (Obj::*f)(SlotArgs...), Obj *o, void **arg)
125 {
127 call_internal<R>(arg, [&] {
128 return (o->*f)((*reinterpret_cast<typename RemoveRef<SignalArgs>::Type *>(arg[II+1]))...);
129 });
130 }
131 };
132 template <size_t... II, typename... SignalArgs, typename R, typename... SlotArgs, typename SlotRet, class Obj>
134 {
135 static void call(SlotRet (Obj::*f)(SlotArgs...) const, Obj *o, void **arg)
136 {
138 call_internal<R>(arg, [&] {
139 return (o->*f)((*reinterpret_cast<typename RemoveRef<SignalArgs>::Type *>(arg[II+1]))...);
140 });
141 }
142 };
143 template <size_t... II, typename... SignalArgs, typename R, typename... SlotArgs, typename SlotRet, class Obj>
145 {
146 static void call(SlotRet (Obj::*f)(SlotArgs...) noexcept, Obj *o, void **arg)
147 {
149 call_internal<R>(arg, [&]() noexcept {
150 return (o->*f)((*reinterpret_cast<typename RemoveRef<SignalArgs>::Type *>(arg[II+1]))...);
151 });
152 }
153 };
154 template <size_t... II, typename... SignalArgs, typename R, typename... SlotArgs, typename SlotRet, class Obj>
155 struct FunctorCall<std::index_sequence<II...>, List<SignalArgs...>, R, SlotRet (Obj::*)(SlotArgs...) const noexcept> : FunctorCallBase
156 {
157 static void call(SlotRet (Obj::*f)(SlotArgs...) const noexcept, Obj *o, void **arg)
158 {
160 call_internal<R>(arg, [&]() noexcept {
161 return (o->*f)((*reinterpret_cast<typename RemoveRef<SignalArgs>::Type *>(arg[II+1]))...);
162 });
163 }
164 };
165
166 template<class Obj, typename Ret, typename... Args> struct FunctionPointer<Ret (Obj::*) (Args...)>
167 {
168 typedef Obj Object;
169 typedef List<Args...> Arguments;
170 typedef Ret ReturnType;
171 typedef Ret (Obj::*Function) (Args...);
172 enum {ArgumentCount = sizeof...(Args), IsPointerToMemberFunction = true};
173 template <typename SignalArgs, typename R>
174 static void call(Function f, Obj *o, void **arg) {
175 FunctorCall<std::index_sequence_for<Args...>, SignalArgs, R, Function>::call(f, o, arg);
176 }
177 };
178 template<class Obj, typename Ret, typename... Args> struct FunctionPointer<Ret (Obj::*) (Args...) const>
179 {
180 typedef Obj Object;
181 typedef List<Args...> Arguments;
182 typedef Ret ReturnType;
183 typedef Ret (Obj::*Function) (Args...) const;
184 enum {ArgumentCount = sizeof...(Args), IsPointerToMemberFunction = true};
185 template <typename SignalArgs, typename R>
186 static void call(Function f, Obj *o, void **arg) {
187 FunctorCall<std::index_sequence_for<Args...>, SignalArgs, R, Function>::call(f, o, arg);
188 }
189 };
190
191 template<typename Ret, typename... Args> struct FunctionPointer<Ret (*) (Args...)>
192 {
193 typedef List<Args...> Arguments;
194 typedef Ret ReturnType;
195 typedef Ret (*Function) (Args...);
196 enum {ArgumentCount = sizeof...(Args), IsPointerToMemberFunction = false};
197 template <typename SignalArgs, typename R>
198 static void call(Function f, void *, void **arg) {
199 FunctorCall<std::index_sequence_for<Args...>, SignalArgs, R, Function>::call(f, arg);
200 }
201 };
202
203 template<class Obj, typename Ret, typename... Args> struct FunctionPointer<Ret (Obj::*) (Args...) noexcept>
204 {
205 typedef Obj Object;
206 typedef List<Args...> Arguments;
207 typedef Ret ReturnType;
208 typedef Ret (Obj::*Function) (Args...) noexcept;
209 enum {ArgumentCount = sizeof...(Args), IsPointerToMemberFunction = true};
210 template <typename SignalArgs, typename R>
211 static void call(Function f, Obj *o, void **arg) {
212 FunctorCall<std::index_sequence_for<Args...>, SignalArgs, R, Function>::call(f, o, arg);
213 }
214 };
215 template<class Obj, typename Ret, typename... Args> struct FunctionPointer<Ret (Obj::*) (Args...) const noexcept>
216 {
217 typedef Obj Object;
218 typedef List<Args...> Arguments;
219 typedef Ret ReturnType;
220 typedef Ret (Obj::*Function) (Args...) const noexcept;
221 enum {ArgumentCount = sizeof...(Args), IsPointerToMemberFunction = true};
222 template <typename SignalArgs, typename R>
223 static void call(Function f, Obj *o, void **arg) {
224 FunctorCall<std::index_sequence_for<Args...>, SignalArgs, R, Function>::call(f, o, arg);
225 }
226 };
227
228 template<typename Ret, typename... Args> struct FunctionPointer<Ret (*) (Args...) noexcept>
229 {
230 typedef List<Args...> Arguments;
231 typedef Ret ReturnType;
232 typedef Ret (*Function) (Args...) noexcept;
233 enum {ArgumentCount = sizeof...(Args), IsPointerToMemberFunction = false};
234 template <typename SignalArgs, typename R>
235 static void call(Function f, void *, void **arg) {
236 FunctorCall<std::index_sequence_for<Args...>, SignalArgs, R, Function>::call(f, arg);
237 }
238 };
239
240 // Traits to detect if there is a conversion between two types,
241 // and that conversion does not include a narrowing conversion.
242 template <typename T>
243 struct NarrowingDetector { T t[1]; }; // from P0608
244
245 template <typename From, typename To, typename Enable = void>
247
248 template <typename From, typename To>
250 std::void_t< decltype( NarrowingDetector<To>{ {std::declval<From>()} } ) >
251 > : std::true_type {};
252
253 // Check for the actual arguments. If they are exactly the same,
254 // then don't bother checking for narrowing; as a by-product,
255 // this solves the problem of incomplete types (which must be supported,
256 // or they would error out in the trait above).
257 template <typename From, typename To, typename Enable = void>
259
260 template <typename From, typename To>
266
267 /*
268 Logic that check if the arguments of the slot matches the argument of the signal.
269 To be used like this:
270 static_assert(CheckCompatibleArguments<FunctionPointer<Signal>::Arguments, FunctionPointer<Slot>::Arguments>::value)
271 */
272 template<typename A1, typename A2> struct AreArgumentsCompatible {
273 static int test(const std::remove_reference_t<A2>&);
274 static char test(...);
275 enum { value = sizeof(test(std::declval<std::remove_reference_t<A1>>())) == sizeof(int) };
276#ifdef QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
278 static_assert(AreArgumentsConvertibleWithoutNarrowing::value, "Signal and slot arguments are not compatible (narrowing)");
279#endif
280 };
281 template<typename A1, typename A2> struct AreArgumentsCompatible<A1, A2&> { enum { value = false }; };
282 template<typename A> struct AreArgumentsCompatible<A&, A&> { enum { value = true }; };
283 // void as a return value
284 template<typename A> struct AreArgumentsCompatible<void, A> { enum { value = true }; };
285 template<typename A> struct AreArgumentsCompatible<A, void> { enum { value = true }; };
286 template<> struct AreArgumentsCompatible<void, void> { enum { value = true }; };
287
288 template <typename List1, typename List2> struct CheckCompatibleArguments { enum { value = false }; };
289 template <> struct CheckCompatibleArguments<List<>, List<>> { enum { value = true }; };
290 template <typename List1> struct CheckCompatibleArguments<List1, List<>> { enum { value = true }; };
291 template <typename Arg1, typename Arg2, typename... Tail1, typename... Tail2>
292 struct CheckCompatibleArguments<List<Arg1, Tail1...>, List<Arg2, Tail2...>>
293 {
294 enum { value = AreArgumentsCompatible<typename RemoveConstRef<Arg1>::Type, typename RemoveConstRef<Arg2>::Type>::value
295 && CheckCompatibleArguments<List<Tail1...>, List<Tail2...>>::value };
296 };
297
298 /*
299 Find the maximum number of arguments a functor object can take and be still compatible with
300 the arguments from the signal.
301 Value is the number of arguments, or -1 if nothing matches.
302 */
303 template <typename Functor, typename ArgList> struct ComputeFunctorArgumentCount;
304
305 template <typename Functor, typename ArgList, bool Done> struct ComputeFunctorArgumentCountHelper
306 { enum { Value = -1 }; };
307 template <typename Functor, typename First, typename... ArgList>
308 struct ComputeFunctorArgumentCountHelper<Functor, List<First, ArgList...>, false>
310 typename List_Left<List<First, ArgList...>, sizeof...(ArgList)>::Value> {};
311
312 template <typename Functor, typename... ArgList> struct ComputeFunctorArgumentCount<Functor, List<ArgList...>>
313 {
314 template <typename F> static auto test(F f) -> decltype(((f.operator()((std::declval<ArgList>())...)), int()));
315 static char test(...);
316 enum {
317 Ok = sizeof(test(std::declval<Functor>())) == sizeof(int),
318 Value = Ok ? int(sizeof...(ArgList)) : int(ComputeFunctorArgumentCountHelper<Functor, List<ArgList...>, Ok>::Value)
319 };
320 };
321
322 /* get the return type of a functor, given the signal argument list */
323 template <typename Functor, typename ArgList> struct FunctorReturnType;
324 template <typename Functor, typename... ArgList> struct FunctorReturnType<Functor, List<ArgList...>>
325 : std::invoke_result<Functor, ArgList...>
326 { };
327
328 template<typename Func, typename... Args>
330 {
332 using Function = ReturnType(*)(Args...);
333 enum {ArgumentCount = sizeof...(Args)};
334 using Arguments = QtPrivate::List<Args...>;
335
336 template <typename SignalArgs, typename R>
337 static void call(Func &f, void *, void **arg) {
338 FunctorCall<std::index_sequence_for<Args...>, SignalArgs, R, Func>::call(f, arg);
339 }
340 };
341
342 template <typename Functor, typename... Args>
344 {
345 private:
346 template <typename F, typename = void>
347 struct Test : std::false_type
348 {
349 };
350 // We explicitly use .operator() to not return true for pointers to free/static function
351 template <typename F>
352 struct Test<F, std::void_t<decltype(std::declval<F>().operator()(std::declval<Args>()...))>>
353 : std::true_type
354 {
355 };
356
357 public:
358 using Type = Test<Functor>;
359 static constexpr bool value = Type::value;
360 };
361
362 template <typename Functor, typename... Args>
363 constexpr bool
365
366 template <typename Func, typename... Args>
368 {
369 private:
370 // Could've been std::conditional_t, but that requires all branches to
371 // be valid
372 static auto Resolve(std::true_type CallOperator) -> FunctorCallable<Func, Args...>;
373 static auto Resolve(std::false_type CallOperator) -> FunctionPointer<std::decay_t<Func>>;
374
375 public:
377 Args...>::Type{}));
378 };
379
380 template<typename Func, typename... Args>
381 struct Callable : CallableHelper<Func, Args...>::Type
382 {};
383 template<typename Func, typename... Args>
384 struct Callable<Func, List<Args...>> : CallableHelper<Func, Args...>::Type
385 {};
386
387 /*
388 Wrapper around ComputeFunctorArgumentCount and CheckCompatibleArgument,
389 depending on whether \a Functor is a PMF or not. Returns -1 if \a Func is
390 not compatible with the \a ExpectedArguments, otherwise returns >= 0.
391 */
392 template<typename Prototype, typename Functor>
393 inline constexpr std::enable_if_t<!std::disjunction_v<std::is_convertible<Prototype, const char *>,
395 std::is_convertible<Functor, const char *>,
397 >,
398 int>
400 {
402 using Actual = std::decay_t<Functor>;
403
406 // PMF or free function
410 else
411 return -1;
412 } else {
413 // lambda or functor
415 }
416 }
417
418 // internal base class (interface) containing functions required to call a slot managed by a pointer to function.
420 {
421 // Don't use virtual functions here; we don't want the
422 // compiler to create tons of per-polymorphic-class stuff that
423 // we'll never need. We just use one function pointer, and the
424 // Operations enum below to distinguish requests
425#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
426 QAtomicInt m_ref = 1;
427 typedef void (*ImplFn)(int which, QSlotObjectBase* this_, QObject *receiver, void **args, bool *ret);
428 const ImplFn m_impl;
429#else
430 using ImplFn = void (*)(QSlotObjectBase* this_, QObject *receiver, void **args, int which, bool *ret);
431 const ImplFn m_impl;
432 QAtomicInt m_ref = 1;
433#endif
434 protected:
435 // The operations that can be requested by calls to m_impl,
436 // see the member functions that call m_impl below for details
444 public:
445 explicit QSlotObjectBase(ImplFn fn) : m_impl(fn) {}
446
447 // A custom deleter compatible with std protocols (op()()) we well as
448 // the legacy QScopedPointer protocol (cleanup()).
449 struct Deleter {
450 void operator()(QSlotObjectBase *p) const noexcept
451 { if (p) p->destroyIfLastRef(); }
452 // for the non-standard QScopedPointer protocol:
453 static void cleanup(QSlotObjectBase *p) noexcept { Deleter{}(p); }
454 };
455
456 bool ref() noexcept { return m_ref.ref(); }
457#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
458 inline void destroyIfLastRef() noexcept
459 { if (!m_ref.deref()) m_impl(Destroy, this, nullptr, nullptr, nullptr); }
460
461 inline bool compare(void **a) { bool ret = false; m_impl(Compare, this, nullptr, a, &ret); return ret; }
462 inline void call(QObject *r, void **a) { m_impl(Call, this, r, a, nullptr); }
463#else
464 inline void destroyIfLastRef() noexcept
465 { if (!m_ref.deref()) m_impl(this, nullptr, nullptr, Destroy, nullptr); }
466
467 inline bool compare(void **a)
468 {
469 bool ret = false;
470 m_impl(this, nullptr, a, Compare, &ret);
471 return ret;
472 }
473 inline void call(QObject *r, void **a) { m_impl(this, r, a, Call, nullptr); }
474#endif
475 bool isImpl(ImplFn f) const { return m_impl == f; }
476 protected:
478 private:
480 };
481
484 inline SlotObjUniquePtr copy(const SlotObjUniquePtr &other) noexcept
485 {
486 if (other)
487 other->ref();
488 return SlotObjUniquePtr{other.get()};
489 }
490
493 public:
494 Q_NODISCARD_CTOR Q_IMPLICIT SlotObjSharedPtr() noexcept = default;
497 : obj(std::move(o))
498 {
499 // does NOT ref() (takes unique_ptr by value)
500 // (that's why (QSlotObjectBase*) ctor doesn't exisit: don't know whether that one _should_)
501 }
505 { auto copy = other; swap(copy); return *this; }
506
508 SlotObjSharedPtr &operator=(SlotObjSharedPtr &&other) noexcept = default;
509 ~SlotObjSharedPtr() = default;
510
511 void swap(SlotObjSharedPtr &other) noexcept { obj.swap(other.obj); }
512
513 auto get() const noexcept { return obj.get(); }
514 auto operator->() const noexcept { return get(); }
515
516 explicit operator bool() const noexcept { return bool(obj); }
517 };
518
519
520 // Implementation of QSlotObjectBase for which the slot is a callable (function, PMF, functor, or lambda).
521 // Args and R are the List of arguments and the return type of the signal to which the slot is connected.
522 template <typename Func, typename Args, typename R>
525 {
526 using FunctorValue = std::decay_t<Func>;
528 using FuncType = Callable<Func, Args>;
529
530#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
531 Q_DECL_HIDDEN static void impl(int which, QSlotObjectBase *this_, QObject *r, void **a, bool *ret)
532#else
533 // Design note: the first three arguments match those for typical Call
534 // and Destroy uses. We return void to enable tail call optimization
535 // for those too.
536 Q_DECL_HIDDEN static void impl(QSlotObjectBase *this_, QObject *r, void **a, int which, bool *ret)
537#endif
538 {
539 const auto that = static_cast<QCallableObject*>(this_);
540 switch (which) {
541 case Destroy:
542 delete that;
543 break;
544 case Call:
545 if constexpr (std::is_member_function_pointer_v<FunctorValue>)
546 FuncType::template call<Args, R>(that->object(), static_cast<typename FuncType::Object *>(r), a);
547 else
548 FuncType::template call<Args, R>(that->object(), r, a);
549 break;
550 case Compare:
551 if constexpr (std::is_member_function_pointer_v<FunctorValue>) {
552 *ret = *reinterpret_cast<FunctorValue *>(a) == that->object();
553 break;
554 }
555 // not implemented otherwise
556 Q_FALLTHROUGH();
557 case NumOperations:
558 Q_UNUSED(ret);
559 }
560 }
561 public:
562 explicit QCallableObject(Func &&f) : QSlotObjectBase(&impl), Storage{std::move(f)} {}
563 explicit QCallableObject(const Func &f) : QSlotObjectBase(&impl), Storage{f} {}
564 };
565
566 // Helper to detect the context object type based on the functor type:
567 // QObject for free functions and lambdas; the callee for member function
568 // pointers. The default declaration doesn't have the ContextType typedef,
569 // and so non-functor APIs (like old-style string-based slots) are removed
570 // from the overload set.
571 template <typename Func, typename = void>
573
574 template <typename Func>
578 >
579 >
580 >
581 {
583 };
584 template <typename Func>
595
596 /*
597 Returns a suitable QSlotObjectBase object that holds \a func, if possible.
598
599 Not available (and thus produces compile-time errors) if the Functor provided is
600 not compatible with the expected Prototype.
601 */
602 template <typename Prototype, typename Functor>
606 {
610
614
616 "Functor requires more arguments than what can be provided.");
617
618 // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks)
620 }
621
622 template<typename Prototype, typename Functor, typename = void>
624 template<typename Prototype, typename Functor>
629
630 template<typename Prototype, typename Functor>
631 inline constexpr bool AssertCompatibleFunctions() {
632 static_assert(AreFunctionsCompatible<Prototype, Functor>::value,
633 "Functor is not compatible with expected prototype!");
634 return true;
635 }
636} // namespace QtPrivate
637
638QT_END_NAMESPACE
bool isImpl(ImplFn f) const
void call(QObject *r, void **a)
SlotObjSharedPtr & operator=(SlotObjSharedPtr &&other) noexcept=default
auto operator->() const noexcept
void swap(SlotObjSharedPtr &other) noexcept
auto get() const noexcept
void assertObjectType(QObject *o)
constexpr bool HasCallOperatorAcceptingArgs_v
constexpr bool AssertCompatibleFunctions()
SlotObjUniquePtr copy(const SlotObjUniquePtr &other) noexcept
std::unique_ptr< QSlotObjectBase, QSlotObjectBase::Deleter > SlotObjUniquePtr
static int test(const std::remove_reference_t< A2 > &)
static auto test(F f) -> decltype(((f.operator()((std::declval< ArgList >())...)), int()))
static void call(Function f, Obj *o, void **arg)
static void call(Function f, void *, void **arg)
static void call_internal(void **args, Lambda &&fn) noexcept(std::is_nothrow_invocable_v< Lambda >)
static void call(Func &f, void *, void **arg)
QtPrivate::List< Args... > Arguments
List_Append< List< typenameL::Car >, typenameList_Left< typenameL::Cdr, N-1 >::Value >::Value Value
static constexpr size_t size
void operator()(QSlotObjectBase *p) const noexcept
static void cleanup(QSlotObjectBase *p) noexcept
static constexpr size_t value
static constexpr size_t value