Go to the documentation of this file.
30 #ifndef ABSL_FUNCTIONAL_ANY_INVOCABLE_H_
31 #define ABSL_FUNCTIONAL_ANY_INVOCABLE_H_
34 #include <initializer_list>
35 #include <type_traits>
38 #include "absl/base/config.h"
40 #include "absl/meta/type_traits.h"
41 #include "absl/utility/utility.h"
156 "The template argument of AnyInvocable must be a function type.");
183 :
Impl(internal_any_invocable::ConversionConstruct(),
194 template <
class T,
class...
Args,
201 "The explicit template argument of in_place_type is required "
202 "to be an unqualified object type.");
206 template <
class T,
class U,
class...
Args,
210 std::initializer_list<U> ilist,
Args&&...
args)
214 "The explicit template argument of in_place_type is required "
215 "to be an unqualified object type.");
269 explicit operator bool()
const noexcept {
return this->HasValue(); }
275 using Impl::operator();
281 return !f.HasValue();
286 return !f.HasValue();
306 template <
bool ,
class ,
class... >
313 #endif // ABSL_FUNCTIONAL_ANY_INVOCABLE_H_
typename std::decay< T >::type decay_t
void(*)(utility_internal::InPlaceTypeTag< T >) in_place_type_t
friend bool operator!=(std::nullptr_t, const AnyInvocable &f) noexcept
AnyInvocable & operator=(F &&f)
AnyInvocable(absl::in_place_type_t< T >, std::initializer_list< U > ilist, Args &&... args)
friend bool operator==(const AnyInvocable &f, std::nullptr_t) noexcept
typename std::enable_if< B, T >::type enable_if_t
True< absl::enable_if_t<!IsInPlaceType< RemoveCVRef< F > >::value >, absl::enable_if_t< Impl< Sig >::template CallIsValid< F >::value >, absl::enable_if_t< Impl< Sig >::template CallIsNoexceptIfSigIsNoexcept< F >::value >, absl::enable_if_t< std::is_constructible< absl::decay_t< F >, F >::value > > CanConvert
#define ABSL_NAMESPACE_END
#define T(upbtypeconst, upbtype, ctype, default_value)
AnyInvocable & operator=(AnyInvocable &&) noexcept=default
#define ABSL_NAMESPACE_BEGIN
typename Impl::result_type result_type
True< absl::enable_if_t< Impl< Sig >::template CallIsValid< F >::value >, absl::enable_if_t< Impl< Sig >::template CallIsNoexceptIfSigIsNoexcept< F >::value >, absl::enable_if_t< std::is_constructible< absl::decay_t< F >, Args... >::value > > CanEmplace
const typedef int * result_type
True< absl::enable_if_t< Impl< Sig >::template CallIsValid< F >::value >, absl::enable_if_t< Impl< Sig >::template CallIsNoexceptIfSigIsNoexcept< F >::value >, absl::enable_if_t< std::is_constructible< absl::decay_t< F >, F >::value > > CanAssign
void swap(Json::Value &a, Json::Value &b)
Specialize std::swap() for Json::Value.
True< absl::enable_if_t< Impl< Sig >::template CallIsValid< std::reference_wrapper< F > >::value >, absl::enable_if_t< Impl< Sig >::template CallIsNoexceptIfSigIsNoexcept< std::reference_wrapper< F > >::value > > CanAssignReferenceWrapper
AnyInvocable & operator=(std::reference_wrapper< F > f) noexcept
void in_place_type(utility_internal::InPlaceTypeTag< T >)
friend bool operator==(std::nullptr_t, const AnyInvocable &f) noexcept
AnyInvocable(absl::in_place_type_t< T >, Args &&... args)
void swap(AnyInvocable &other) noexcept
AnyInvocable() noexcept=default
constexpr T && forward(absl::remove_reference_t< T > &t) noexcept
friend bool operator!=(const AnyInvocable &f, std::nullptr_t) noexcept
friend void swap(AnyInvocable &f1, AnyInvocable &f2) noexcept
grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:30