/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() argument 53 MakeEmptyT(MakeEmptyT &&) { in MakeEmptyT() argument 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 | 47 struct MakeEmptyT { struct 49 MakeEmptyT() { ++alive; } in MakeEmptyT() argument 50 MakeEmptyT(const MakeEmptyT &) { in MakeEmptyT() function 55 MakeEmptyT(MakeEmptyT &&) { throw 42; } in MakeEmptyT() argument 56 MakeEmptyT &operator=(const MakeEmptyT &) { throw 42; } in operator =() argument 57 MakeEmptyT &operator=(MakeEmptyT &&) { throw 42; } in operator =() argument 58 ~MakeEmptyT() { --alive; } in ~MakeEmptyT() argument 61 int MakeEmptyT::alive = 0; 64 Variant v2(std::in_place_type<MakeEmptyT>); in makeEmpty() 124 using V = std::variant<int, MakeEmptyT>; in test_copy_ctor_valueless_by_exception()
|
D | move.pass.cpp | 49 struct MakeEmptyT { struct 51 MakeEmptyT() { ++alive; } in MakeEmptyT() argument 52 MakeEmptyT(const MakeEmptyT &) { in MakeEmptyT() function 57 MakeEmptyT(MakeEmptyT &&) { throw 42; } in MakeEmptyT() argument 58 MakeEmptyT &operator=(const MakeEmptyT &) { throw 42; } in operator =() argument 59 MakeEmptyT &operator=(MakeEmptyT &&) { throw 42; } in operator =() argument 60 ~MakeEmptyT() { --alive; } in ~MakeEmptyT() argument 63 int MakeEmptyT::alive = 0; 66 Variant v2(std::in_place_type<MakeEmptyT>); in makeEmpty() 161 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 | 123 struct MakeEmptyT { struct 125 MakeEmptyT() { ++alive; } in MakeEmptyT() argument 126 MakeEmptyT(const MakeEmptyT &) { in MakeEmptyT() function 131 MakeEmptyT(MakeEmptyT &&) { throw 42; } in MakeEmptyT() function 132 MakeEmptyT &operator=(const MakeEmptyT &) { throw 42; } in operator =() argument 133 MakeEmptyT &operator=(MakeEmptyT &&) { throw 42; } in operator =() argument 134 ~MakeEmptyT() { --alive; } in ~MakeEmptyT() argument 137 int MakeEmptyT::alive = 0; 140 Variant v2(std::in_place_type<MakeEmptyT>); in makeEmpty() 188 using MET = MakeEmptyT; in test_copy_assignment_empty_empty() [all …]
|
D | move.pass.cpp | 147 using MET = MakeEmptyT; in test_move_assignment_empty_empty() 164 using MET = MakeEmptyT; in test_move_assignment_non_empty_empty() 190 using MET = MakeEmptyT; in test_move_assignment_empty_non_empty() 246 using MET = MakeEmptyT; in test_move_assignment_same_index() 286 using MET = MakeEmptyT; in test_move_assignment_different_index()
|
/external/libcxx/test/std/utilities/variant/variant.visit/ |
D | visit.pass.cpp | 253 using V = std::variant<int, MakeEmptyT>; in test_exceptions() 259 using V = std::variant<int, MakeEmptyT>; in test_exceptions() 267 using V = std::variant<int, MakeEmptyT>; in test_exceptions() 275 using V = std::variant<int, MakeEmptyT>; in test_exceptions() 276 using V2 = std::variant<long, std::string, void *, MakeEmptyT>; in test_exceptions()
|
/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.variant/variant.status/ |
D | valueless_by_exception.pass.cpp | 49 using V = std::variant<int, MakeEmptyT>; in main()
|
D | index.pass.cpp | 56 using V = std::variant<int, MakeEmptyT>; in main()
|
/external/libcxx/test/std/utilities/variant/variant.variant/variant.swap/ |
D | swap.pass.cpp | 182 using V = std::variant<int, MakeEmptyT>; in test_swap_valueless_by_exception() 188 assert(MakeEmptyT::alive == 0); in test_swap_valueless_by_exception() 193 assert(MakeEmptyT::alive == 0); in test_swap_valueless_by_exception() 199 assert(MakeEmptyT::alive == 0); in test_swap_valueless_by_exception()
|