Home
last modified time | relevance | path

Searched refs:CopyOnly (Results 1 – 24 of 24) sorted by relevance

/llvm-project-15.0.7/libcxx/test/std/iterators/iterator.requirements/alg.req.ind.copy/
H A Dindirectly_copyable.compile.pass.cpp19 struct CopyOnly { struct
20 CopyOnly() = default;
22 CopyOnly(CopyOnly const&) = default;
23 CopyOnly& operator=(CopyOnly const&) = default;
25 CopyOnly(CopyOnly&&) = delete;
26 CopyOnly& operator=(CopyOnly&&) = delete;
62 static_assert( std::indirectly_copyable<CopyOnly*, CopyOnly*>);
63 static_assert(!std::indirectly_copyable<CopyOnly*, const CopyOnly*>);
64 static_assert( std::indirectly_copyable<const CopyOnly*, CopyOnly*>);
78 static_assert( std::indirectly_copyable<CopyOnly*, PointerTo<CopyOnly>>);
[all …]
H A Dindirectly_copyable_storable.compile.pass.cpp19 struct CopyOnly { struct
20 CopyOnly(CopyOnly&&) = delete;
21 CopyOnly(CopyOnly const&) = default;
22 CopyOnly& operator=(CopyOnly&&) = delete;
23 CopyOnly& operator=(CopyOnly const&) = default;
24 CopyOnly() = default;
44 static_assert(!std::indirectly_copyable_storable<CopyOnly*, CopyOnly*>);
45 static_assert(!std::indirectly_copyable_storable<PointerTo<CopyOnly>, PointerTo<CopyOnly>>);
/llvm-project-15.0.7/clang/test/CXX/class/class.init/class.copy.elision/
H A Dp3.cpp328 struct CopyOnly { struct
330 CopyOnly(CopyOnly&);
343 CopyOnly t1() { in t1()
348 CopyOnly t2() { in t2()
349 CopyOnly&& r = static_cast<CopyOnly&&>(copyonly); in t2()
369 CopyOnly&& r = static_cast<CopyOnly&&>(copyonly); in t6()
387 struct CopyOnly {}; struct
406 CopyOnly (&&r)() = static_cast<CopyOnly(&&)()>(make_copyonly); in t2()
471 struct CopyOnly { struct
489 CopyOnly w2; in test2()
[all …]
/llvm-project-15.0.7/libcxx/test/std/utilities/utility/utility.swap/
H A Dswap.pass.cpp24 struct CopyOnly { struct
25 CopyOnly() {} in CopyOnly() argument
26 CopyOnly(CopyOnly const&) noexcept {} in CopyOnly() argument
27 CopyOnly& operator=(CopyOnly const&) { return *this; } in operator =() argument
98 static_assert(can_swap<CopyOnly&>(), ""); in main()
105 CopyOnly c; in main()
H A Dswap_array.pass.cpp26 struct CopyOnly { struct
27 CopyOnly() {} in CopyOnly() function
28 CopyOnly(CopyOnly const&) noexcept {} in CopyOnly() argument
29 CopyOnly& operator=(CopyOnly const&) { return *this; } in operator =() argument
103 using CA = CopyOnly[42]; in main()
/llvm-project-15.0.7/libcxx/test/std/utilities/utility/pairs/pairs.pair/
H A Dconst_pair_U_V.pass.cpp102 test_pair_const<CopyOnly, CopyOnly>(); in test()
103 test_pair_const<CopyOnly, CopyOnly&>(); in test()
104 test_pair_const<CopyOnly, CopyOnly&&>(); in test()
106 test_pair_const<ExplicitTypes::CopyOnly, ExplicitTypes::CopyOnly>(); in test()
107 test_pair_const<ExplicitTypes::CopyOnly, ExplicitTypes::CopyOnly&, true, in test()
109 test_pair_const<ExplicitTypes::CopyOnly, ExplicitTypes::CopyOnly&&, true, in test()
H A Drv_pair_U_V.pass.cpp119 test_pair_rv<CopyOnly, CopyOnly>(); in main()
120 test_pair_rv<CopyOnly, CopyOnly&>(); in main()
121 test_pair_rv<CopyOnly, CopyOnly&&>(); in main()
123 test_pair_rv<ExplicitTypes::CopyOnly, ExplicitTypes::CopyOnly>(); in main()
124 test_pair_rv<ExplicitTypes::CopyOnly, ExplicitTypes::CopyOnly&, true, false>(); in main()
125 test_pair_rv<ExplicitTypes::CopyOnly, ExplicitTypes::CopyOnly&&, true, false>(); in main()
H A DU_V.pass.cpp63 test_sfinae<CopyOnly, CopyOnly&>(); in main()
64 test_sfinae<CopyOnly, CopyOnly&&>(); in main()
65 test_sfinae<ExplicitTypes::CopyOnly, ExplicitTypes::CopyOnly&, true, false>(); in main()
66 test_sfinae<ExplicitTypes::CopyOnly, ExplicitTypes::CopyOnly&&, true, false>(); in main()
H A Dspecial_member_generation_test.pass.cpp69 test<CopyOnly, true, true>(); in test_constructors_exist()
70 test<CopyOnly &, true>(); in test_constructors_exist()
71 test<CopyOnly &&, false, true>(); in test_constructors_exist()
114 test<CopyOnly, true>(); in test_assignment_operator_exists()
115 test<CopyOnly &, true>(); in test_assignment_operator_exists()
116 test<CopyOnly &&, true>(); in test_assignment_operator_exists()
H A Dassign_pair.pass.cpp43 typedef std::pair<ConstexprTestTypes::CopyOnly, int> P; in test()
44 const P p1(ConstexprTestTypes::CopyOnly(), short{4}); in test()
H A Dconst_first_const_second.pass.cpp68 test_sfinae<CopyOnly>(); in main()
69 test_sfinae<ExplicitTypes::CopyOnly, true, false>(); in main()
H A Dassign_rv_pair.pass.cpp80 using P = std::pair<CountAssign, ConstexprTestTypes::CopyOnly>; in test()
/llvm-project-15.0.7/libcxx/test/support/
H A Darchetypes.ipp90 struct CopyOnly : DEFINE_BASE(CopyOnly) {
91 using Base = DEFINE_BASE(CopyOnly);
93 DEFINE_EXPLICIT DEFINE_CONSTEXPR CopyOnly() DEFINE_NOEXCEPT DEFINE_DEFAULT_CTOR;
94 DEFINE_EXPLICIT DEFINE_CONSTEXPR CopyOnly(CopyOnly const &) DEFINE_NOEXCEPT DEFINE_CTOR;
95 DEFINE_EXPLICIT DEFINE_CONSTEXPR CopyOnly(CopyOnly &&) DEFINE_NOEXCEPT = delete;
96 CopyOnly &operator=(CopyOnly const &) DEFINE_NOEXCEPT DEFINE_ASSIGN;
97 CopyOnly &operator=(CopyOnly &&) DEFINE_NOEXCEPT = delete;
98 DEFINE_DTOR(CopyOnly)
167 CopyOnly,
/llvm-project-15.0.7/clang/test/CodeGenCoroutines/
H A Dcoro-dwarf-exp-namespace.cpp40 struct CopyOnly { struct
42 CopyOnly(const CopyOnly &) noexcept; argument
43 CopyOnly(CopyOnly &&) = delete;
44 ~CopyOnly();
H A Dcoro-dwarf.cpp40 struct CopyOnly { struct
42 CopyOnly(const CopyOnly &) noexcept; argument
43 CopyOnly(CopyOnly &&) = delete;
44 ~CopyOnly();
H A Dcoro-params-exp-namespace.cpp41 struct CopyOnly { struct
43 CopyOnly(const CopyOnly &) noexcept; argument
44 CopyOnly(CopyOnly &&) = delete;
45 ~CopyOnly();
H A Dcoro-params.cpp41 struct CopyOnly { struct
43 CopyOnly(const CopyOnly&) noexcept; argument
44 CopyOnly(CopyOnly&&) = delete;
45 ~CopyOnly();
/llvm-project-15.0.7/libcxx/test/std/concepts/concepts.lang/concept.copyconstructible/
H A Dcopy_constructible.compile.pass.cpp160 struct CopyOnly { struct
161 CopyOnly(CopyOnly&&) noexcept = delete;
162 CopyOnly(const CopyOnly&) = default;
164 CopyOnly& operator=(CopyOnly&&) noexcept = delete;
165 CopyOnly& operator=(const CopyOnly&) = default;
167 static_assert(!std::copy_constructible<CopyOnly>);
/llvm-project-15.0.7/clang/test/CXX/special/class.copy/
H A Dimplicit-move.cpp227 struct CopyOnly { struct
228 CopyOnly(const CopyOnly&);
229 CopyOnly &operator=(const CopyOnly&);
235 template void test(CopyOnly); // ok, copies
238 CopyOnly co;
H A Dp11.0x.move.cpp155 struct CopyOnly { struct
156 CopyOnly(const CopyOnly&);
160 CopyOnly CO;
/llvm-project-15.0.7/clang/test/SemaObjCXX/
H A Dblock-capture.mm11 struct CopyOnly { struct
12 CopyOnly(); // cxx2b-note {{not viable}} argument
13 CopyOnly(CopyOnly &); // cxx2b-note {{not viable}} argument
15 TEST(CopyOnly); // cxx2b-error {{no matching constructor}} argument
/llvm-project-15.0.7/libcxx/test/std/utilities/variant/variant.variant/variant.assign/
H A Dmove.pass.cpp34 struct CopyOnly { struct
35 CopyOnly(const CopyOnly &) = default;
36 CopyOnly(CopyOnly &&) = delete;
37 CopyOnly &operator=(const CopyOnly &) = default;
38 CopyOnly &operator=(CopyOnly &&) = delete;
175 using V = std::variant<int, CopyOnly>; in test_move_assignment_sfinae()
221 using V = std::variant<int, CopyOnly>; in test_move_assignment_sfinae()
H A Dcopy.pass.cpp32 struct CopyOnly { struct
33 CopyOnly(const CopyOnly &) = default;
34 CopyOnly(CopyOnly &&) = delete;
35 CopyOnly &operator=(const CopyOnly &) = default;
36 CopyOnly &operator=(CopyOnly &&) = delete;
216 using V = std::variant<int, CopyOnly>; in test_copy_assignment_sfinae()
252 using V = std::variant<int, CopyOnly>; in test_copy_assignment_sfinae()
/llvm-project-15.0.7/libcxx/test/std/utilities/optional/optional.specalg/
H A Dswap.pass.cpp97 using T = TestTypes::CopyOnly; in test_swap_sfinae()