Home
last modified time | relevance | path

Searched refs:reference_wrapper (Results 1 – 25 of 52) sorted by relevance

123

/external/libcxx/test/libcxx/utilities/function.objects/refwrap/
Dbinary.pass.cpp53 std::reference_wrapper<functor1> >::value), ""); in main()
55 std::reference_wrapper<functor2> >::value), ""); in main()
57 std::reference_wrapper<functor3> >::value), ""); in main()
59 std::reference_wrapper<functor4> >::value), ""); in main()
61 std::reference_wrapper<C> >::value), ""); in main()
63 std::reference_wrapper<float ()> >::value), ""); in main()
65 std::reference_wrapper<float (int)> >::value), ""); in main()
67 std::reference_wrapper<float (int, int)> >::value), ""); in main()
69 std::reference_wrapper<float(*)()> >::value), ""); in main()
71 std::reference_wrapper<float(*)(int)> >::value), ""); in main()
[all …]
Dunary.pass.cpp53 std::reference_wrapper<functor1> >::value), ""); in main()
55 std::reference_wrapper<functor2> >::value), ""); in main()
57 std::reference_wrapper<functor3> >::value), ""); in main()
59 std::reference_wrapper<functor4> >::value), ""); in main()
61 std::reference_wrapper<C> >::value), ""); in main()
63 std::reference_wrapper<float(*)()> >::value), ""); in main()
65 std::reference_wrapper<float (int)> >::value), ""); in main()
67 std::reference_wrapper<float (int, int)> >::value), ""); in main()
69 std::reference_wrapper<float(*)(int)> >::value), ""); in main()
71 std::reference_wrapper<float(*)(int, int)> >::value), ""); in main()
[all …]
/external/libcxx/test/std/utilities/function.objects/refwrap/
Dweak_result.pass.cpp74 static_assert((std::is_same<std::reference_wrapper<functor1>::result_type, in main()
76 static_assert((std::is_same<std::reference_wrapper<functor2>::result_type, in main()
78 static_assert((std::is_same<std::reference_wrapper<functor3>::result_type, in main()
80 static_assert((std::is_same<std::reference_wrapper<void()>::result_type, in main()
82 static_assert((std::is_same<std::reference_wrapper<int*(double*)>::result_type, in main()
84 static_assert((std::is_same<std::reference_wrapper<void(*)()>::result_type, in main()
86 static_assert((std::is_same<std::reference_wrapper<int*(*)(double*)>::result_type, in main()
88 static_assert((std::is_same<std::reference_wrapper<int*(C::*)(double*)>::result_type, in main()
90 …static_assert((std::is_same<std::reference_wrapper<int (C::*)(double*) const volatile>::result_typ… in main()
92 static_assert((std::is_same<std::reference_wrapper<C()>::result_type, in main()
[all …]
Dtype.pass.cpp23 static_assert((std::is_same<std::reference_wrapper<C>::type, in main()
25 static_assert((std::is_same<std::reference_wrapper<void ()>::type, in main()
27 static_assert((std::is_same<std::reference_wrapper<int* (double*)>::type, in main()
29 static_assert((std::is_same<std::reference_wrapper<void(*)()>::type, in main()
31 static_assert((std::is_same<std::reference_wrapper<int*(*)(double*)>::type, in main()
33 static_assert((std::is_same<std::reference_wrapper<int*(C::*)(double*)>::type, in main()
35 static_assert((std::is_same<std::reference_wrapper<int (C::*)(double*) const volatile>::type, in main()
/external/libcxx/test/std/utilities/function.objects/refwrap/refwrap.invoke/
Dinvoke.pass.cpp48 std::reference_wrapper<void (int)> r1(f_void_1); in test_void_1()
57 std::reference_wrapper<void (*)(int)> r1(fp); in test_void_1()
66 std::reference_wrapper<A_void_1> r1(a0); in test_void_1()
75 std::reference_wrapper<void (A_void_1::*)()> r1(fp); in test_void_1()
88 std::reference_wrapper<void (A_void_1::*)() const> r1(fp); in test_void_1()
125 std::reference_wrapper<int (int)> r1(f_int_1); in test_int_1()
132 std::reference_wrapper<int (*)(int)> r1(fp); in test_int_1()
139 std::reference_wrapper<A_int_1> r1(a0); in test_int_1()
146 std::reference_wrapper<int (A_int_1::*)()> r1(fp); in test_int_1()
155 std::reference_wrapper<int (A_int_1::*)() const> r1(fp); in test_int_1()
[all …]
Dinvoke_int_0.pass.cpp41 std::reference_wrapper<int ()> r1(f_int_0); in test_int_0()
47 std::reference_wrapper<int (*)()> r1(fp); in test_int_0()
53 std::reference_wrapper<A_int_0> r1(a0); in test_int_0()
Dinvoke_void_0.pass.cpp42 std::reference_wrapper<void ()> r1(f_void_0); in test_void_0()
50 std::reference_wrapper<void (*)()> r1(fp); in test_void_0()
58 std::reference_wrapper<A_void_0> r1(a0); in test_void_0()
/external/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/
Dresult_of.pass.cpp141 test_result_of<PMS0( std::reference_wrapper<S>), int> (); in main()
142 test_result_of<PMS0(const std::reference_wrapper<S>&), int> (); in main()
143 test_result_of<PMS0( std::reference_wrapper<SD>), int> (); in main()
144 test_result_of<PMS0(const std::reference_wrapper<SD>&), int> (); in main()
153 test_no_result<PMS0(std::reference_wrapper<S const>)>(); in main()
154 test_no_result<PMS0(std::reference_wrapper<ND> )>(); in main()
163 test_result_of<PMS1(std::reference_wrapper<S>, int), int*> (); in main()
164 test_result_of<PMS1(const std::reference_wrapper<S>&, int), int*> (); in main()
165 test_result_of<PMS1(std::reference_wrapper<SD>, int), int*> (); in main()
166 test_result_of<PMS1(const std::reference_wrapper<SD>&, int), int*> (); in main()
[all …]
Dresult_of11.pass.cpp98 test_result_of_imp<PMD(std::reference_wrapper<F>), char &>(); in main()
99 test_result_of_imp<PMD(std::reference_wrapper<F const>), const char &>(); in main()
100 test_result_of_imp<PMD(std::reference_wrapper<FD>), char &>(); in main()
101 test_result_of_imp<PMD(std::reference_wrapper<FD const>), const char &>(); in main()
166 test_result_of_imp<int (F::* (std::reference_wrapper<F>)) (), int>(); in main()
167 test_result_of_imp<int (F::* (std::reference_wrapper<const F>)) () const, int>(); in main()
/external/libcxx/test/std/utilities/function.objects/refwrap/refwrap.assign/
Dcopy_assign.pass.cpp27 std::reference_wrapper<T> r(t); in test()
29 std::reference_wrapper<T> r2(t2); in test()
40 std::reference_wrapper<void ()> r(f); in test_function()
41 std::reference_wrapper<void ()> r2(g); in test_function()
/external/libcxx/test/std/utilities/function.objects/func.invoke/
Dinvoke.pass.cpp177 std::reference_wrapper<TestClass> cl(cl_obj); in bullet_one_two_tests()
190 std::reference_wrapper<DerivedFromTestClass> cl(cl_obj); in bullet_one_two_tests()
249 test_b34<int&>(std::reference_wrapper<Fn>(cl)); in bullet_three_four_tests()
250 test_b34<int const&>(std::reference_wrapper<Fn const>(cl)); in bullet_three_four_tests()
251 test_b34<int volatile&>(std::reference_wrapper<Fn volatile>(cl)); in bullet_three_four_tests()
252 test_b34<int const volatile&>(std::reference_wrapper<Fn const volatile>(cl)); in bullet_three_four_tests()
257 test_b34<int&>(std::reference_wrapper<Fn>(cl)); in bullet_three_four_tests()
258 test_b34<int const&>(std::reference_wrapper<Fn const>(cl)); in bullet_three_four_tests()
259 test_b34<int volatile&>(std::reference_wrapper<Fn volatile>(cl)); in bullet_three_four_tests()
260 test_b34<int const volatile&>(std::reference_wrapper<Fn const volatile>(cl)); in bullet_three_four_tests()
/external/clang/test/CXX/temp/temp.decls/temp.variadic/
Dexample-bind.cpp39 class reference_wrapper { class
43 reference_wrapper(T& t) : ptr(&t) { } in reference_wrapper() function in reference_wrapper
47 template<typename T> reference_wrapper<T> ref(T& t) { in ref()
48 return reference_wrapper<T>(t); in ref()
50 template<typename T> reference_wrapper<const T> cref(const T& t) { in cref()
51 return reference_wrapper<const T>(t); in cref()
99 struct make_tuple_result<reference_wrapper<T> > {
283 inline T& mu(reference_wrapper<T>& bound_arg, const tuple<Args&...>&) { in mu()
307 struct is_reference_wrapper<reference_wrapper<T>> {
Dexample-tuple.cpp39 class reference_wrapper { class
43 reference_wrapper(T& t) : ptr(&t) { } in reference_wrapper() function in reference_wrapper
47 template<typename T> reference_wrapper<T> ref(T& t) { in ref()
48 return reference_wrapper<T>(t); in ref()
50 template<typename T> reference_wrapper<const T> cref(const T& t) { in cref()
51 return reference_wrapper<const T>(t); in cref()
119 struct make_tuple_result<reference_wrapper<T> > {
/external/libcxx/test/std/utilities/meta/meta.rel/
Dis_invocable.pass.cpp58 using T = std::reference_wrapper<Tag>; in main()
59 using DT = std::reference_wrapper<DerFromTag>; in main()
60 using CT = std::reference_wrapper<const Tag>; in main()
96 using T = std::reference_wrapper<Tag>; in main()
97 using DT = std::reference_wrapper<DerFromTag>; in main()
98 using CT = std::reference_wrapper<const Tag>; in main()
/external/libcxx/test/libcxx/utilities/function.objects/func.require/
Dbullet_1_2_3.pass.cpp158 std::reference_wrapper<T> rref(obj); in doTest()
159 std::reference_wrapper<D> drref(der); in doTest()
212 void runTest(const std::reference_wrapper<T>& obj) { in runTest()
251 struct DerivedFromRefWrap : public std::reference_wrapper<Tp> {
252 DerivedFromRefWrap(Tp& tp) : std::reference_wrapper<Tp>(tp) {} in DerivedFromRefWrap()
258 std::reference_wrapper<int> r(x); in test_derived_from_ref_wrap()
259 std::reference_wrapper<std::reference_wrapper<int>> r2(r); in test_derived_from_ref_wrap()
261 auto get_fn = &std::reference_wrapper<int>::get; in test_derived_from_ref_wrap()
Dinvoke_helpers.h90 std::reference_wrapper<const Tp> makeConst(std::reference_wrapper<Tp>& ref) { in makeConst()
91 return std::reference_wrapper<const Tp>(ref.get()); in makeConst()
101 std::reference_wrapper<volatile Tp> makeVolatile(std::reference_wrapper<Tp>& ref) { in makeVolatile()
102 return std::reference_wrapper<volatile Tp>(ref.get()); in makeVolatile()
112 std::reference_wrapper<const volatile Tp> makeCV(std::reference_wrapper<Tp>& ref) { in makeCV()
113 return std::reference_wrapper<const volatile Tp>(ref.get()); in makeCV()
/external/libcxx/test/std/utilities/function.objects/refwrap/refwrap.helpers/
Dcref_2.pass.cpp22 std::reference_wrapper<const int> r1 = std::cref(i); in main()
23 std::reference_wrapper<const int> r2 = std::cref(r1); in main()
Dref_2.pass.cpp30 std::reference_wrapper<int> r1 = std::ref(i); in main()
31 std::reference_wrapper<int> r2 = std::ref(r1); in main()
Dref_1.pass.cpp22 std::reference_wrapper<int> r = std::ref(i); in main()
/external/libbrillo/brillo/
Dany_unittest.cc196 EXPECT_EQ(5, val.Get<std::reference_wrapper<int>>().get()); in TEST()
197 val.Get<std::reference_wrapper<int>>().get() = 7; in TEST()
198 EXPECT_EQ(7, val.Get<std::reference_wrapper<int>>().get()); in TEST()
202 EXPECT_EQ(7, val2.Get<std::reference_wrapper<const int>>().get()); in TEST()
205 EXPECT_EQ(10, val.Get<std::reference_wrapper<int>>().get()); in TEST()
206 EXPECT_EQ(10, val2.Get<std::reference_wrapper<const int>>().get()); in TEST()
/external/libcxx/test/std/utilities/function.objects/refwrap/refwrap.const/
Dcopy_ctor.pass.cpp27 std::reference_wrapper<T> r(t); in test()
28 std::reference_wrapper<T> r2 = r; in test()
Dtype_ctor.fail.cpp23 std::reference_wrapper<const int> r(3); in main()
/external/libcxx/include/
D__functional_base375 class _LIBCPP_TEMPLATE_VIS reference_wrapper
386 _LIBCPP_INLINE_VISIBILITY reference_wrapper(type& __f) _NOEXCEPT
389 private: reference_wrapper(type&&); public: // = delete; // do not bind to temps
515 reference_wrapper<_Tp>
518 return reference_wrapper<_Tp>(__t);
523 reference_wrapper<_Tp>
524 ref(reference_wrapper<_Tp> __t) _NOEXCEPT
531 reference_wrapper<const _Tp>
534 return reference_wrapper<const _Tp>(__t);
539 reference_wrapper<const _Tp>
[all …]
/external/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iterator/
Dtypes.pass.cpp73 typedef DummyIt<int, std::reference_wrapper<int> > T; in main()
75 static_assert(std::is_same<It::reference, std::reference_wrapper<int> >::value, ""); in main()
/external/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/
DPR20855_tuple_ref_binding_diagnostics.pass.cpp54 static_assert(std::is_constructible<int&, std::reference_wrapper<int>>::value, "");
55 static_assert(std::is_constructible<int const&, std::reference_wrapper<int>>::value, "");

123