Home
last modified time | relevance | path

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

/llvm-project-15.0.7/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/
H A Dnoncopyable_return_type.pass.cpp30 struct NonCopyable { struct
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()
49 std::function<NonCopyable(int)> f1b = [](int) { return NonCopyable(); }; in test()
50 std::function<NonCopyable(int)> f2b = +[](int) { return NonCopyable(); }; in test()
[all …]
/llvm-project-15.0.7/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;
81 int& foo(NonCopyable&&) { in foo() argument
93 NonCopyable arg; in test_b12()
137 NonCopyable arg; in test_b5()
158 test_b12<int&(NonCopyable&&) &, int&>(cl); in bullet_one_two_tests()
170 test_b12<int&(NonCopyable&&) &, int&>(cl); in bullet_one_two_tests()
183 test_b12<int&(NonCopyable&&) &, int&>(cl); in bullet_one_two_tests()
[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;
79 constexpr const int& foo(NonCopyable&&) { in foo() argument
90 NonCopyable arg; in test_b12()
134 NonCopyable arg; in test_b5()
155 test_b12<int&(NonCopyable&&) &, int&>(cl); in bullet_one_two_tests()
163 test_b12<int&(NonCopyable&&) &, int&>(cl); in bullet_one_two_tests()
172 test_b12<int&(NonCopyable&&) &, int&>(cl); in bullet_one_two_tests()
[all …]
/llvm-project-15.0.7/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()
84 const NonCopyable &nc6 = xvalue<NonCopyable>(); in test_direct_binding()
86 NonCopyable &&nc8 = ConvertsTo<NonCopyable&&>(); in test_direct_binding()
[all …]
/llvm-project-15.0.7/libcxx/test/std/utilities/utility/pairs/pairs.pair/
H A Dconst_pair_U_V.pass.cpp112 test_pair_const<NonCopyable, NonCopyable, false>(); in test()
113 test_pair_const<NonCopyable, NonCopyable&, false>(); in test()
114 test_pair_const<NonCopyable, NonCopyable&&, false>(); in test()
115 test_pair_const<NonCopyable, const NonCopyable&, false>(); in test()
116 test_pair_const<NonCopyable, const NonCopyable&&, false>(); in test()
120 test_pair_const<NonCopyable&, NonCopyable&>(); in test()
121 test_pair_const<NonCopyable&, NonCopyable&&>(); in test()
122 test_pair_const<NonCopyable&, NonCopyable const&, false>(); in test()
123 test_pair_const<NonCopyable const&, NonCopyable&&>(); in test()
124 test_pair_const<NonCopyable&&, NonCopyable&&, false>(); in test()
H A Drv_pair_U_V.pass.cpp127 test_pair_rv<NonCopyable, NonCopyable, false>(); in main()
128 test_pair_rv<NonCopyable, NonCopyable&, false>(); in main()
129 test_pair_rv<NonCopyable, NonCopyable&&, false>(); in main()
130 test_pair_rv<NonCopyable, const NonCopyable&, false>(); in main()
131 test_pair_rv<NonCopyable, const NonCopyable&&, false>(); in main()
134 test_pair_rv<NonCopyable&, NonCopyable&>(); in main()
135 test_pair_rv<NonCopyable&, NonCopyable&&>(); in main()
136 test_pair_rv<NonCopyable&, NonCopyable const&, false>(); in main()
137 test_pair_rv<NonCopyable const&, NonCopyable&&>(); in main()
138 test_pair_rv<NonCopyable&&, NonCopyable&&>(); in main()
H A DU_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.cpp61 test<NonCopyable, false>(); in test_constructors_exist()
62 test<NonCopyable &, true>(); in test_constructors_exist()
63 test<NonCopyable &&, false, true>(); in test_constructors_exist()
109 test<NonCopyable, false>(); in test_assignment_operator_exists()
110 test<NonCopyable &, false>(); in test_assignment_operator_exists()
111 test<NonCopyable &&, false>(); in test_assignment_operator_exists()
H A Dconst_first_const_second.pass.cpp72 test_sfinae<NonCopyable, false>(); in main()
73 test_sfinae<ExplicitTypes::NonCopyable, false>(); in main()
H A Dassign_pair.pass.cpp62 using P = std::pair<int, ConstexprTestTypes::NonCopyable>; in test()
/llvm-project-15.0.7/libcxx/test/std/utilities/meta/meta.rel/
H A Dis_convertible.pass.cpp54 class NonCopyable { class
55 NonCopyable(NonCopyable&);
240 static_assert((std::is_convertible<NonCopyable&, NonCopyable&>::value), ""); in main()
241 static_assert((std::is_convertible<NonCopyable&, const NonCopyable&>::value), ""); in main()
242 static_assert((std::is_convertible<NonCopyable&, const volatile NonCopyable&>::value), ""); in main()
243 static_assert((std::is_convertible<NonCopyable&, volatile NonCopyable&>::value), ""); in main()
244 static_assert((std::is_convertible<const NonCopyable&, const NonCopyable&>::value), ""); in main()
245 … static_assert((std::is_convertible<const NonCopyable&, const volatile NonCopyable&>::value), ""); in main()
246 …static_assert((std::is_convertible<volatile NonCopyable&, const volatile NonCopyable&>::value), ""… in main()
248 static_assert((!std::is_convertible<const NonCopyable&, NonCopyable&>::value), ""); in main()
[all …]
/llvm-project-15.0.7/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-15.0.7/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()
395 static_assert(!std::convertible_to<const NonCopyable&, NonCopyable&>); in main()
[all …]
/llvm-project-15.0.7/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()
H A Dp15-star-this-capture.cpp3 class NonCopyable { class
4 NonCopyable(const NonCopyable&) = delete; //expected-note3{{explicitly marked deleted here}}
/llvm-project-15.0.7/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() argument
169 NonCopyable(const NonCopyable&);
172 NonCopyable() {} in NonCopyable() function in NonCopyable
245 std::call_once(f, NonCopyable(), i); in main()
/llvm-project-15.0.7/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-15.0.7/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;
172 class X16 : public NonCopyable {
/llvm-project-15.0.7/clang/test/SemaCXX/
H A Ddllexport-pr22591.cpp10 struct NonCopyable { struct
15 NonCopyable();
24 NonCopyable member;
/llvm-project-15.0.7/llvm/unittests/ADT/
H A DSmallVectorTest.cpp160 struct NonCopyable { struct
161 NonCopyable() {} in NonCopyable() function
162 NonCopyable(NonCopyable &&) {} in NonCopyable() function
163 NonCopyable &operator=(NonCopyable &&) { return *this; } in operator =() argument
165 NonCopyable(const NonCopyable &) = delete;
166 NonCopyable &operator=(const NonCopyable &) = delete;
170 SmallVector<NonCopyable, 0> V; in CompileTest()
H A DMapVectorTest.cpp150 TEST(MapVectorTest, NonCopyable) { in TEST() argument
307 TEST(SmallMapVectorSmallTest, NonCopyable) { in TEST() argument
/llvm-project-15.0.7/clang/docs/
H A DUsersManual.rst633 struct NonCopyable {
634 NonCopyable();
636 NonCopyable(const NonCopyable&);
638 void foo(const NonCopyable&);
640 foo(NonCopyable()); // Disallowed in C++98; allowed in C++11.