/external/libcxx/test/support/ |
D | variant_test_helpers.hpp | 45 struct MakeEmptyT { struct 47 MakeEmptyT() { ++alive; } in MakeEmptyT() function 48 MakeEmptyT(MakeEmptyT const&) { in MakeEmptyT() function 53 MakeEmptyT(MakeEmptyT &&) { in MakeEmptyT() function 56 MakeEmptyT& operator=(MakeEmptyT const&) { in operator =() argument 59 MakeEmptyT& operator=(MakeEmptyT&&) { in operator =() argument 62 ~MakeEmptyT() { --alive; } in ~MakeEmptyT() argument 64 static_assert(std::is_swappable_v<MakeEmptyT>, ""); // required for test 66 int MakeEmptyT::alive = 0; 70 Variant v2(std::in_place_type<MakeEmptyT>); in makeEmpty()
|
/external/libcxx/test/std/utilities/variant/variant.relops/ |
D | relops.pass.cpp | 47 struct MakeEmptyT { struct 48 MakeEmptyT() = default; 49 MakeEmptyT(MakeEmptyT &&) { throw 42; } in MakeEmptyT() argument 50 MakeEmptyT &operator=(MakeEmptyT &&) { throw 42; } in operator =() argument 52 inline bool operator==(const MakeEmptyT &, const MakeEmptyT &) { in operator ==() argument 56 inline bool operator!=(const MakeEmptyT &, const MakeEmptyT &) { in operator !=() argument 60 inline bool operator<(const MakeEmptyT &, const MakeEmptyT &) { in operator <() argument 64 inline bool operator<=(const MakeEmptyT &, const MakeEmptyT &) { in operator <=() argument 68 inline bool operator>(const MakeEmptyT &, const MakeEmptyT &) { in operator >() argument 72 inline bool operator>=(const MakeEmptyT &, const MakeEmptyT &) { in operator >=() argument [all …]
|
/external/libcxx/test/std/utilities/variant/variant.variant/variant.ctor/ |
D | copy.pass.cpp | 84 struct MakeEmptyT { struct 86 MakeEmptyT() { ++alive; } in MakeEmptyT() argument 87 MakeEmptyT(const MakeEmptyT &) { in MakeEmptyT() function 92 MakeEmptyT(MakeEmptyT &&) { throw 42; } in MakeEmptyT() argument 93 MakeEmptyT &operator=(const MakeEmptyT &) { throw 42; } in operator =() argument 94 MakeEmptyT &operator=(MakeEmptyT &&) { throw 42; } in operator =() argument 95 ~MakeEmptyT() { --alive; } in ~MakeEmptyT() argument 98 int MakeEmptyT::alive = 0; 101 Variant v2(std::in_place_type<MakeEmptyT>); in makeEmpty() 228 using V = std::variant<int, MakeEmptyT>; in test_copy_ctor_valueless_by_exception()
|
D | move.pass.cpp | 86 struct MakeEmptyT { struct 88 MakeEmptyT() { ++alive; } in MakeEmptyT() function 89 MakeEmptyT(const MakeEmptyT &) { in MakeEmptyT() function 94 MakeEmptyT(MakeEmptyT &&) { throw 42; } in MakeEmptyT() function 95 MakeEmptyT &operator=(const MakeEmptyT &) { throw 42; } in operator =() argument 96 MakeEmptyT &operator=(MakeEmptyT &&) { throw 42; } in operator =() argument 97 ~MakeEmptyT() { --alive; } in ~MakeEmptyT() argument 100 int MakeEmptyT::alive = 0; 103 Variant v2(std::in_place_type<MakeEmptyT>); in makeEmpty() 298 using V = std::variant<int, MakeEmptyT>; in test_move_ctor_valueless_by_exception()
|
/external/libcxx/test/std/utilities/variant/variant.variant/variant.assign/ |
D | copy.pass.cpp | 183 struct MakeEmptyT { struct 185 MakeEmptyT() { ++alive; } in MakeEmptyT() function 186 MakeEmptyT(const MakeEmptyT &) { in MakeEmptyT() argument 191 MakeEmptyT(MakeEmptyT &&) { throw 42; } in MakeEmptyT() function 192 MakeEmptyT &operator=(const MakeEmptyT &) { throw 42; } in operator =() argument 193 MakeEmptyT &operator=(MakeEmptyT &&) { throw 42; } in operator =() argument 194 ~MakeEmptyT() { --alive; } in ~MakeEmptyT() argument 197 int MakeEmptyT::alive = 0; 200 Variant v2(std::in_place_type<MakeEmptyT>); in makeEmpty() 271 using MET = MakeEmptyT; in test_copy_assignment_empty_empty() [all …]
|
D | move.pass.cpp | 241 using MET = MakeEmptyT; in test_move_assignment_empty_empty() 258 using MET = MakeEmptyT; in test_move_assignment_non_empty_empty() 284 using MET = MakeEmptyT; in test_move_assignment_empty_non_empty() 342 using MET = MakeEmptyT; in test_move_assignment_same_index() 428 using MET = MakeEmptyT; in test_move_assignment_different_index()
|
/external/libcxx/test/std/utilities/variant/variant.hash/ |
D | hash.pass.cpp | 28 template <> struct hash<::MakeEmptyT> { 29 size_t operator()(const ::MakeEmptyT &) const { in operator ()() 83 using V = std::variant<int, MakeEmptyT>; in test_hash_variant()
|
/external/libcxx/test/std/utilities/variant/variant.visit/ |
D | visit.pass.cpp | 271 using V = std::variant<int, MakeEmptyT>; in test_exceptions() 277 using V = std::variant<int, MakeEmptyT>; in test_exceptions() 285 using V = std::variant<int, MakeEmptyT>; in test_exceptions() 293 using V = std::variant<int, MakeEmptyT>; in test_exceptions() 294 using V2 = std::variant<long, std::string, void *, MakeEmptyT>; in test_exceptions()
|
/external/libcxx/test/std/utilities/variant/variant.variant/variant.status/ |
D | valueless_by_exception.pass.cpp | 47 using V = std::variant<int, MakeEmptyT>; in main()
|
D | index.pass.cpp | 54 using V = std::variant<int, MakeEmptyT>; in main()
|
/external/libcxx/test/std/utilities/variant/variant.variant/variant.swap/ |
D | swap.pass.cpp | 190 using V = std::variant<int, MakeEmptyT>; in test_swap_valueless_by_exception() 196 assert(MakeEmptyT::alive == 0); in test_swap_valueless_by_exception() 201 assert(MakeEmptyT::alive == 0); in test_swap_valueless_by_exception() 207 assert(MakeEmptyT::alive == 0); in test_swap_valueless_by_exception()
|