• Home
  • Raw
  • Download

Lines Matching refs:ftl

47 static_assert(std::is_invocable_r_v<void, ftl::Function<void()>>);
48 static_assert(std::is_trivially_copyable_v<ftl::Function<void()>>);
49 static_assert(std::is_trivially_destructible_v<ftl::Function<void()>>);
50 static_assert(std::is_trivially_copy_constructible_v<ftl::Function<void()>>);
51 static_assert(std::is_trivially_move_constructible_v<ftl::Function<void()>>);
52 static_assert(std::is_trivially_copy_assignable_v<ftl::Function<void()>>);
53 static_assert(std::is_trivially_move_assignable_v<ftl::Function<void()>>);
56 using function_traits = ftl::details::function_traits<T>;
67 static_assert(!ftl::is_function_v<KnownSizeFunctionObject<0>>);
68 static_assert(!ftl::is_function_v<std::function<void()>>);
69 static_assert(ftl::is_function_v<ftl::Function<void()>>);
74 using function_opaque_storage = ftl::details::function_opaque_storage<N>;
109 return ftl::make_function([this] { on_event(); }); in TEST()
114 ftl::Function<void()> f; in TEST()
120 f = ftl::make_function<&MyClass::on_event>(&cls); in TEST()
123 f = ftl::no_op; in TEST()
132 using MyFunction = ftl::Function<int(std::string_view), 2>; in TEST()
139 f1 = ftl::no_op; in TEST()
146 ftl::Function<int()> f; in TEST()
152 EXPECT_TRUE(ftl::Function<int()>() == f); in TEST()
153 EXPECT_FALSE(ftl::Function<int()>() != f); in TEST()
156 f = ftl::no_op; in TEST()
165 EXPECT_FALSE(ftl::Function<int()>() == f); in TEST()
166 EXPECT_TRUE(ftl::Function<int()>() != f); in TEST()
169 f = ftl::Function<int()>{nullptr}; in TEST()
177 f = ftl::no_op; in TEST()
178 ftl::Function<int()> g{std::move(f)}; in TEST()
187 ftl::Function<int()> h{f}; in TEST()
197 ftl::Function<void()> f{std::move(lambda)}; in TEST()
201 auto f = ftl::Function([] { return 1; }); in TEST()
231 using Function = ftl::Function<int(int)>; in TEST()
243 EXPECT_EQ(check(ftl::no_op), 0); in TEST()
264 auto f = ftl::make_function<&Observer::setCalled>(&observer); in TEST()
270 EXPECT_TRUE(f == ftl::Function<void()>::make<&Observer::setCalled>(&observer)); in TEST()
279 const auto f = ftl::make_function<&Observer::setCalled>(&observer); in TEST()
285 EXPECT_TRUE(f == ftl::Function<void()>::make<&Observer::setCalled>(&observer)); in TEST()
294 const auto f = ftl::make_function<&Observer::setCalled>(&observer); in TEST()
300 EXPECT_TRUE(f == ftl::Function<void()>::make<&Observer::setCalled>(&observer)); in TEST()
304 auto f = ftl::make_function([](int a, int b) { return a + b; }); in TEST()
310 auto f = ftl::make_function([&called](int a, int b) { in TEST()
320 auto f = ftl::make_function([&called](int a, int b) mutable { in TEST()
333 auto f = ftl::make_function( in TEST()
350 auto f = ftl::make_function<&std::make_unique<int, int>>(); in TEST()
358 ftl::Function<void()> a{[ptr_counter = &counter] { (*ptr_counter)++; }}; in TEST()
359 ftl::Function<void(), 1> b = a; in TEST()
360 ftl::Function<void(), 2> c = a; in TEST()