Home
last modified time | relevance | path

Searched refs:function_ref (Results 1 – 3 of 3) sorted by relevance

/aosp12/system/libbase/include/android-base/
H A Dfunction_ref.h81 class function_ref; variable
84 class function_ref<Ret(Args...)> final {
86 constexpr function_ref() noexcept = delete;
87 constexpr function_ref(const function_ref& other) noexcept = default;
88 constexpr function_ref& operator=(const function_ref&) noexcept = default;
92 !std::is_same_v<function_ref, std::remove_reference_t<Callable>>>>
93 function_ref(Callable&& c) noexcept in function_ref() function
94 : mTypeErasedFunction([](const function_ref* self, Args... args) -> Ret { in function_ref()
105 function_ref& operator=(Callable&& c) noexcept {
106 mTypeErasedFunction = [](const function_ref* self, Args... args) -> Ret {
[all …]
/aosp12/system/libbase/
H A Dfunction_ref_test.cpp26 TEST(function_ref, Ctor) { in TEST() argument
29 using EmptyFunc = function_ref<void()>; in TEST()
56 TEST(function_ref, Call) { in TEST() argument
57 function_ref<int(int)> view = [](int i) { return i + 1; }; in TEST()
61 function_ref<std::string(std::string)> fs = [](const std::string& s) { return s + "1"; }; in TEST()
67 function_ref<std::string()> fs2 = lambda; in TEST()
74 TEST(function_ref, CopyAndAssign) { in TEST() argument
75 function_ref<int(int)> view = [](int i) { return i + 1; }; in TEST()
80 function_ref<int(int)> view2 = view; in TEST()
/aosp12/frameworks/base/services/incremental/
H A DServiceWrappers.h86 using ExistingMountCallback = android::base::function_ref<
90 using FileCallback = android::base::function_ref<bool(const Control& control, FileId fileId)>;
172 using FileCallback = android::base::function_ref<bool(std::string_view)>;