Home
last modified time | relevance | path

Searched refs:NonCopyable (Results 1 – 25 of 33) sorted by relevance

12

/llvm-project/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/
H A Dnoncopyable_return_type.pass.cpp30 struct NonCopyable { struct
31 NonCopyable() = default;
32 NonCopyable(NonCopyable&&) = delete;
33 friend bool operator==(NonCopyable, NonCopyable) { return true; } in operator ==() argument
38 NonCopyable operator()() const { return NonCopyable(); } in operator ()()
39 NonCopyable operator()(int) const { return NonCopyable(); } in operator ()()
40 NonCopyable f() const { return NonCopyable(); } in f()
45 std::function<NonCopyable()> f1a = []() { return NonCopyable(); }; in test()
46 std::function<NonCopyable()> f2a = +[]() { return NonCopyable(); }; in test()
47 std::function<NonCopyable()> f3a = LargeLambda(); in test()
[all …]
/llvm-project/libcxx/test/std/utilities/function.objects/func.invoke/
H A Dinvoke.pass.cpp51 struct NonCopyable { struct
52 NonCopyable() {} in NonCopyable() argument
54 NonCopyable(NonCopyable const&) = delete;
55 NonCopyable& operator=(NonCopyable const&) = delete;
61 int& operator()(NonCopyable&&) & { return data; } in operator ()()
62 int const& operator()(NonCopyable&&) const & { return data; } in operator ()()
63 int volatile& operator()(NonCopyable&&) volatile & { return data; } in operator ()()
64 int const volatile& operator()(NonCopyable&&) const volatile & { return data; } in operator ()()
66 int&& operator()(NonCopyable&&) && { return std::move(data); } in operator ()()
67 int const&& operator()(NonCopyable&&) const && { return std::move(data); } in operator ()()
[all …]
H A Dinvoke_constexpr.pass.cpp52 struct NonCopyable { struct
53 constexpr NonCopyable() {} in NonCopyable() argument
55 NonCopyable(NonCopyable const&) = delete;
56 NonCopyable& operator=(NonCopyable const&) = delete;
62 constexpr int& operator()(NonCopyable&&) & { return data; } in operator ()()
63 constexpr int const& operator()(NonCopyable&&) const & { return data; } in operator ()()
65 constexpr int&& operator()(NonCopyable&&) && { return std::move(data); } in operator ()()
66 constexpr int const&& operator()(NonCopyable&&) const && { return std::move(data); } in operator ()()
79 constexpr const int& foo(NonCopyable&&) { in foo() argument
90 NonCopyable arg; in test_b12()
[all …]
H A Dinvoke_r.pass.cpp78 struct NonCopyable { in test() struct
79 NonCopyable() = default; in test()
80 NonCopyable(NonCopyable const&) = delete; in test()
81 NonCopyable(NonCopyable&&) = default; in test()
86 auto f = [&](NonCopyable) { was_called = true; }; in test() argument
87 std::invoke_r<void>(f, NonCopyable()); in test()
93 auto f = [&](NonCopyable) -> int { was_called = true; return 0; }; in test() argument
94 (void)std::invoke_r<int>(f, NonCopyable()); in test()
/llvm-project/clang/test/CXX/dcl.decl/dcl.init/dcl.init.ref/
H A Dp5-0x.cpp68 class NonCopyable { class
69 NonCopyable(const NonCopyable&);
72 class NonCopyableDerived : public NonCopyable {
78 NonCopyable &&nc0 = prvalue<NonCopyable>(); in test_direct_binding()
79 NonCopyable &&nc1 = prvalue<NonCopyableDerived>(); in test_direct_binding()
80 NonCopyable &&nc2 = xvalue<NonCopyable>(); in test_direct_binding()
81 NonCopyable &&nc3 = xvalue<NonCopyableDerived>(); in test_direct_binding()
82 const NonCopyable &nc4 = prvalue<NonCopyable>(); in test_direct_binding()
83 const NonCopyable &nc5 = prvalue<NonCopyableDerived>(); in test_direct_binding()
84 const NonCopyable &nc6 = xvalue<NonCopyable>(); in test_direct_binding()
[all …]
/llvm-project/libcxx/test/std/utilities/utility/pairs/pairs.pair/
H A Dctor.pair_U_V_const_ref.pass.cpp113 test_pair_const<NonCopyable, NonCopyable, false>(); in test()
114 test_pair_const<NonCopyable, NonCopyable&, false>(); in test()
115 test_pair_const<NonCopyable, NonCopyable&&, false>(); in test()
116 test_pair_const<NonCopyable, const NonCopyable&, false>(); in test()
117 test_pair_const<NonCopyable, const NonCopyable&&, false>(); in test()
121 test_pair_const<NonCopyable&, NonCopyable&>(); in test()
122 test_pair_const<NonCopyable&, NonCopyable&&>(); in test()
123 test_pair_const<NonCopyable&, NonCopyable const&, false>(); in test()
124 test_pair_const<NonCopyable const&, NonCopyable&&>(); in test()
125 test_pair_const<NonCopyable&&, NonCopyable&&, false>(); in test()
H A Dctor.pair_U_V_move.pass.cpp149 test_pair_rv<NonCopyable, NonCopyable, false>(); in main()
150 test_pair_rv<NonCopyable, NonCopyable&, false>(); in main()
151 test_pair_rv<NonCopyable, NonCopyable&&, false>(); in main()
152 test_pair_rv<NonCopyable, const NonCopyable&, false>(); in main()
153 test_pair_rv<NonCopyable, const NonCopyable&&, false>(); in main()
156 test_pair_rv<NonCopyable&, NonCopyable&>(); in main()
157 test_pair_rv<NonCopyable&, NonCopyable&&>(); in main()
158 test_pair_rv<NonCopyable&, NonCopyable const&, false>(); in main()
159 test_pair_rv<NonCopyable const&, NonCopyable&&>(); in main()
160 test_pair_rv<NonCopyable&&, NonCopyable&&>(); in main()
H A Dctor.U_V.pass.cpp71 test_sfinae<NonCopyable, NonCopyable&, false>(); in main()
72 test_sfinae<NonCopyable, NonCopyable&&, false>(); in main()
73 test_sfinae<ExplicitTypes::NonCopyable, ExplicitTypes::NonCopyable&, false>(); in main()
74 test_sfinae<ExplicitTypes::NonCopyable, ExplicitTypes::NonCopyable&&, false>(); in main()
H A Dspecial_member_generation_test.pass.cpp62 test<NonCopyable, false>(); in test_constructors_exist()
63 test<NonCopyable &, true>(); in test_constructors_exist()
64 test<NonCopyable &&, false, true>(); in test_constructors_exist()
110 test<NonCopyable, false>(); in test_assignment_operator_exists()
111 test<NonCopyable &, false>(); in test_assignment_operator_exists()
112 test<NonCopyable &&, false>(); in test_assignment_operator_exists()
/llvm-project/libcxx/test/std/utilities/meta/meta.rel/
H A Dis_convertible.pass.cpp54 class NonCopyable { class
55 NonCopyable(NonCopyable&);
243 static_assert((std::is_convertible<NonCopyable&, NonCopyable&>::value), ""); in main()
244 static_assert((std::is_convertible<NonCopyable&, const NonCopyable&>::value), ""); in main()
245 static_assert((std::is_convertible<NonCopyable&, const volatile NonCopyable&>::value), ""); in main()
246 static_assert((std::is_convertible<NonCopyable&, volatile NonCopyable&>::value), ""); in main()
247 static_assert((std::is_convertible<const NonCopyable&, const NonCopyable&>::value), ""); in main()
248 … static_assert((std::is_convertible<const NonCopyable&, const volatile NonCopyable&>::value), ""); in main()
249 …static_assert((std::is_convertible<volatile NonCopyable&, const volatile NonCopyable&>::value), ""… in main()
250 …static_assert((std::is_convertible<const volatile NonCopyable&, const volatile NonCopyable&>::valu… in main()
[all …]
/llvm-project/libcxx/test/std/iterators/iterator.requirements/alg.req.permutable/
H A Dpermutable.compile.pass.cpp30 struct NonCopyable { struct
31 NonCopyable(const NonCopyable&) = delete;
32 NonCopyable& operator=(const NonCopyable&) = delete;
33 friend void swap(NonCopyable&, NonCopyable&);
35 using NotIMS = forward_iterator<NonCopyable*>;
/llvm-project/clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/
H A Davoid-const-or-ref-data-members.cpp241 struct NonCopyable struct
243 NonCopyable(NonCopyable const&) = delete;
244 NonCopyable& operator=(NonCopyable const&) = delete;
245 NonCopyable(NonCopyable&&) = default;
246 NonCopyable& operator=(NonCopyable&&) = default;
266 struct InheritFromNonCopyable : NonCopyable
[all...]
H A Dspecial-member-functions-relaxed.cpp99 struct NonCopyable : NoCopy struct
101 NonCopyable() = default;
102 NonCopyable(const NonCopyable&) = delete;
/llvm-project/libcxx/test/std/concepts/concepts.lang/concept.convertible/
H A Dconvertible_to.pass.cpp98 class NonCopyable { class
99 NonCopyable(NonCopyable&);
384 static_assert(std::convertible_to<NonCopyable&, NonCopyable&>); in main()
385 static_assert(std::convertible_to<NonCopyable&, const NonCopyable&>); in main()
386 static_assert(std::convertible_to<NonCopyable&, const volatile NonCopyable&>); in main()
387 static_assert(std::convertible_to<NonCopyable&, volatile NonCopyable&>); in main()
388 static_assert(std::convertible_to<const NonCopyable&, const NonCopyable&>); in main()
390 std::convertible_to<const NonCopyable&, const volatile NonCopyable&>); in main()
392 std::convertible_to<volatile NonCopyable&, const volatile NonCopyable&>); in main()
393 static_assert(std::convertible_to<const volatile NonCopyable&, in main()
[all …]
/llvm-project/clang/test/CXX/expr/expr.prim/expr.prim.lambda/
H A Dp15.cpp4 class NonCopyable { class
5 NonCopyable(const NonCopyable&);
8 void capture_by_ref(NonCopyable nc, NonCopyable &ncr) { in capture_by_ref()
H A Dp14.cpp5 class NonCopyable { class
6 NonCopyable(const NonCopyable&); // expected-note 2 {{implicitly declared private here}}
16 void capture_by_copy(NonCopyable nc, NonCopyable &ncr, const NonConstCopy nco) { in capture_by_copy()
/llvm-project/libcxx/test/libcxx/utilities/expected/expected.expected/
H A Dvalue_or.mandates.verify.cpp22 struct NonCopyable { struct
23 NonCopyable(int) {} in NonCopyable() function
24 NonCopyable(const NonCopyable&) = delete;
38 const std::expected<NonCopyable, int> f1{5}; in test()
H A Derror_or.mandates.verify.cpp21 struct NonCopyable { struct
22 NonCopyable(int) {} in NonCopyable() function
23 NonCopyable(const NonCopyable&) = delete;
38 const std::expected<int, NonCopyable> f1(std::unexpect, 0); in test()
/llvm-project/libcxx/test/libcxx/utilities/expected/expected.void/
H A Derror_or.mandates.verify.cpp21 struct NonCopyable { struct
22 NonCopyable(int) {} in NonCopyable() function
23 NonCopyable(const NonCopyable&) = delete;
38 const std::expected<void, NonCopyable> f1(std::unexpect, 0); in test()
/llvm-project/libcxx/test/std/utilities/expected/expected.expected/ctor/
H A Dctor.copy.pass.cpp36 struct NonCopyable {
37 NonCopyable(const NonCopyable&) = delete;
54 static_assert(!std::is_copy_constructible_v<std::expected<NonCopyable, int>>);
55 static_assert(!std::is_copy_constructible_v<std::expected<int, NonCopyable>>);
56 static_assert(!std::is_copy_constructible_v<std::expected<NonCopyable, NonCopyable>>);
35 struct NonCopyable { global() struct
/llvm-project/libcxx/test/std/utilities/expected/expected.void/monadic/
H A Dand_then.pass.cpp25 struct NonCopyable { struct
26 constexpr NonCopyable(int) {} in NonCopyable() argument
27 NonCopyable(const NonCopyable&) = delete;
42 std::expected<void, NonCopyable> return_noncopyable() { return {}; } in return_noncopyable()
46 static_assert(!has_and_then<std::expected<void, NonCopyable>&, decltype(return_noncopyable)>);
48 static_assert(!has_and_then<const std::expected<void, NonCopyable>&, decltype(return_noncopyable)>);
/llvm-project/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.callonce/
H A Dcall_once.pass.cpp160 class NonCopyable class
165 NonCopyable(const NonCopyable&) in NonCopyable() function in NonCopyable
169 NonCopyable(const NonCopyable&);
172 NonCopyable() {} in NonCopyable() function in NonCopyable
245 std::call_once(f, NonCopyable(), i); in main()
/llvm-project/libcxx/test/support/
H A Darchetypes.ipp101 struct NonCopyable : DEFINE_BASE(NonCopyable) {
102 using Base = DEFINE_BASE(NonCopyable);
104 DEFINE_EXPLICIT DEFINE_CONSTEXPR NonCopyable() DEFINE_NOEXCEPT DEFINE_DEFAULT_CTOR;
105 DEFINE_EXPLICIT DEFINE_CONSTEXPR NonCopyable(NonCopyable const &) DEFINE_NOEXCEPT = delete;
106 NonCopyable &operator=(NonCopyable const &) DEFINE_NOEXCEPT = delete;
107 DEFINE_DTOR(NonCopyable)
168 NonCopyable,
/llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone/
H A Dcopy-constructor-init.cpp3 class NonCopyable { class
5 NonCopyable() = default;
6 NonCopyable(const NonCopyable &) = delete;
171 class X16 : public NonCopyable {
/llvm-project/clang/test/SemaCXX/
H A Ddllexport-pr22591.cpp10 struct NonCopyable { struct
15 NonCopyable();
24 NonCopyable member;

12