29 template <
typename...>
32 template <
typename,
typename =
void>
51 template <
typename Callable,
typename... Args>
52 static void invoke (
Callable&& fn, Args&&... args)
54 if constexpr (detail::equalityComparableToNullptr<Callable>)
56 JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE (
"-Waddress")
59 fn (std::forward<Args> (args)...);
61 JUCE_END_IGNORE_WARNINGS_GCC_LIKE
65 fn (std::forward<Args> (args)...);
69 template <
typename... Args>
78template <
typename A,
typename B>
82template <
typename Object,
typename OtherObject,
typename Member,
typename Other>
85 copy.*
member = std::forward<Other> (value);
101template <
typename Functor>
102static constexpr auto toFnPtr (
Functor functor) {
return detail::toFnPtr (
functor, &Functor::operator()); }
Object withMember(Object copy, Member OtherObject::*member, Other &&value)
Copies an object, sets one of the copy's members to the specified value, and then returns the copy.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
Some helper methods for checking a callable object before invoking with the specified arguments.