Home
last modified time | relevance | path

Searched refs:MakeEmptyT (Results 1 – 12 of 12) sorted by relevance

/llvm-project-15.0.7/libcxx/test/std/utilities/variant/variant.relops/
H A Drelops.pass.cpp45 struct MakeEmptyT { struct
46 MakeEmptyT() = default;
47 MakeEmptyT(MakeEmptyT &&) { throw 42; } in MakeEmptyT() argument
48 MakeEmptyT &operator=(MakeEmptyT &&) { throw 42; } in operator =() argument
50 inline bool operator==(const MakeEmptyT &, const MakeEmptyT &) { in operator ==() argument
54 inline bool operator!=(const MakeEmptyT &, const MakeEmptyT &) { in operator !=() argument
58 inline bool operator<(const MakeEmptyT &, const MakeEmptyT &) { in operator <() argument
62 inline bool operator<=(const MakeEmptyT &, const MakeEmptyT &) { in operator <=() argument
66 inline bool operator>(const MakeEmptyT &, const MakeEmptyT &) { in operator >() argument
70 inline bool operator>=(const MakeEmptyT &, const MakeEmptyT &) { in operator >=() argument
[all …]
/llvm-project-15.0.7/libcxx/test/support/
H A Dvariant_test_helpers.h54 struct MakeEmptyT { struct
56 MakeEmptyT() { ++alive; } in MakeEmptyT() function
57 MakeEmptyT(MakeEmptyT const&) { in MakeEmptyT() argument
62 MakeEmptyT(MakeEmptyT &&) { in MakeEmptyT() argument
65 MakeEmptyT& operator=(MakeEmptyT const&) {
68 MakeEmptyT& operator=(MakeEmptyT&&) {
71 ~MakeEmptyT() { --alive; } in ~MakeEmptyT() argument
73 static_assert(std::is_swappable_v<MakeEmptyT>, ""); // required for test
75 int MakeEmptyT::alive = 0;
79 Variant v2(std::in_place_type<MakeEmptyT>); in makeEmpty()
/llvm-project-15.0.7/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/
H A Dcopy.pass.cpp77 struct MakeEmptyT { struct
79 MakeEmptyT() { ++alive; } in MakeEmptyT() argument
80 MakeEmptyT(const MakeEmptyT &) { in MakeEmptyT() function
85 MakeEmptyT(MakeEmptyT &&) { throw 42; } in MakeEmptyT() function
86 MakeEmptyT &operator=(const MakeEmptyT &) { throw 42; } in operator =() argument
87 MakeEmptyT &operator=(MakeEmptyT &&) { throw 42; } in operator =() argument
88 ~MakeEmptyT() { --alive; } in ~MakeEmptyT() argument
91 int MakeEmptyT::alive = 0;
94 Variant v2(std::in_place_type<MakeEmptyT>); in makeEmpty()
221 using V = std::variant<int, MakeEmptyT>; in test_copy_ctor_valueless_by_exception()
H A Dmove.pass.cpp79 struct MakeEmptyT { struct
81 MakeEmptyT() { ++alive; } in MakeEmptyT() function
82 MakeEmptyT(const MakeEmptyT &) { in MakeEmptyT() argument
87 MakeEmptyT(MakeEmptyT &&) { throw 42; } in MakeEmptyT() function
88 MakeEmptyT &operator=(const MakeEmptyT &) { throw 42; } in operator =() argument
89 MakeEmptyT &operator=(MakeEmptyT &&) { throw 42; } in operator =() argument
90 ~MakeEmptyT() { --alive; } in ~MakeEmptyT() argument
93 int MakeEmptyT::alive = 0;
96 Variant v2(std::in_place_type<MakeEmptyT>); in makeEmpty()
291 using V = std::variant<int, MakeEmptyT>; in test_move_ctor_valueless_by_exception()
/llvm-project-15.0.7/libcxx/test/std/utilities/variant/variant.variant/variant.assign/
H A Dcopy.pass.cpp172 struct MakeEmptyT { struct
174 MakeEmptyT() { ++alive; } in MakeEmptyT() argument
175 MakeEmptyT(const MakeEmptyT &) { in MakeEmptyT() function
180 MakeEmptyT(MakeEmptyT &&) { throw 42; } in MakeEmptyT() function
181 MakeEmptyT &operator=(const MakeEmptyT &) { throw 42; } in operator =() argument
182 MakeEmptyT &operator=(MakeEmptyT &&) { throw 42; } in operator =() argument
186 int MakeEmptyT::alive = 0;
260 using MET = MakeEmptyT; in test_copy_assignment_empty_empty()
277 using MET = MakeEmptyT; in test_copy_assignment_non_empty_empty()
303 using MET = MakeEmptyT; in test_copy_assignment_empty_non_empty()
[all …]
H A Dmove.pass.cpp229 using MET = MakeEmptyT; in test_move_assignment_empty_empty()
246 using MET = MakeEmptyT; in test_move_assignment_non_empty_empty()
272 using MET = MakeEmptyT; in test_move_assignment_empty_non_empty()
330 using MET = MakeEmptyT; in test_move_assignment_same_index()
416 using MET = MakeEmptyT; in test_move_assignment_different_index()
/llvm-project-15.0.7/libcxx/test/std/utilities/variant/variant.hash/
H A Dhash.pass.cpp26 template <> struct hash<::MakeEmptyT> {
27 size_t operator()(const ::MakeEmptyT &) const { in operator ()()
81 using V = std::variant<int, MakeEmptyT>; in test_hash_variant()
/llvm-project-15.0.7/libcxx/test/std/utilities/variant/variant.visit/
H A Dvisit.pass.cpp289 using V = std::variant<int, MakeEmptyT>; in test_exceptions()
295 using V = std::variant<int, MakeEmptyT>; in test_exceptions()
303 using V = std::variant<int, MakeEmptyT>; in test_exceptions()
311 using V = std::variant<int, MakeEmptyT>; in test_exceptions()
312 using V2 = std::variant<long, std::string, void *, MakeEmptyT>; in test_exceptions()
320 using V = std::variant<int, long, double, MakeEmptyT>; in test_exceptions()
326 using V = std::variant<int, long, double, long long, MakeEmptyT>; in test_exceptions()
H A Dvisit_return_type.pass.cpp336 using V = std::variant<int, MakeEmptyT>; in test_exceptions()
342 using V = std::variant<int, MakeEmptyT>; in test_exceptions()
350 using V = std::variant<int, MakeEmptyT>; in test_exceptions()
358 using V = std::variant<int, MakeEmptyT>; in test_exceptions()
359 using V2 = std::variant<long, std::string, void *, MakeEmptyT>; in test_exceptions()
367 using V = std::variant<int, long, double, MakeEmptyT>; in test_exceptions()
373 using V = std::variant<int, long, double, long long, MakeEmptyT>; in test_exceptions()
/llvm-project-15.0.7/libcxx/test/std/utilities/variant/variant.variant/variant.status/
H A Dvalueless_by_exception.pass.cpp45 using V = std::variant<int, MakeEmptyT>; in main()
H A Dindex.pass.cpp52 using V = std::variant<int, MakeEmptyT>; in main()
/llvm-project-15.0.7/libcxx/test/std/utilities/variant/variant.variant/variant.swap/
H A Dswap.pass.cpp183 using V = std::variant<int, MakeEmptyT>; in test_swap_valueless_by_exception()
189 assert(MakeEmptyT::alive == 0); in test_swap_valueless_by_exception()
194 assert(MakeEmptyT::alive == 0); in test_swap_valueless_by_exception()
200 assert(MakeEmptyT::alive == 0); in test_swap_valueless_by_exception()