/external/libcxx/test/std/utilities/any/any.nonmembers/any.cast/ |
D | any_cast_pointer.pass.cpp | 35 using std::any_cast; 40 static_assert(noexcept(any_cast<int>(&a)), ""); in test_cast_is_noexcept() 43 static_assert(noexcept(any_cast<int>(&ca)), ""); in test_cast_is_noexcept() 49 static_assert(std::is_same<decltype(any_cast<int>(&a)), int*>::value, ""); in test_cast_return_type() 50 static_assert(std::is_same<decltype(any_cast<int const>(&a)), int const*>::value, ""); in test_cast_return_type() 53 static_assert(std::is_same<decltype(any_cast<int>(&ca)), int const*>::value, ""); in test_cast_return_type() 54 static_assert(std::is_same<decltype(any_cast<int const>(&ca)), int const*>::value, ""); in test_cast_return_type() 60 assert(nullptr == any_cast<int>(a)); in test_cast_nullptr() 61 assert(nullptr == any_cast<int const>(a)); in test_cast_nullptr() 64 assert(nullptr == any_cast<int>(ca)); in test_cast_nullptr() [all …]
|
D | any_cast_reference.pass.cpp | 40 using std::any_cast; 47 static_assert(!noexcept(any_cast<int>(static_cast<any&>(a))), ""); in test_cast_is_not_noexcept() 48 static_assert(!noexcept(any_cast<int>(static_cast<any const&>(a))), ""); in test_cast_is_not_noexcept() 49 static_assert(!noexcept(any_cast<int>(static_cast<any &&>(a))), ""); in test_cast_is_not_noexcept() 55 static_assert(std::is_same<decltype(any_cast<int>(a)), int>::value, ""); in test_cast_return_type() 56 static_assert(std::is_same<decltype(any_cast<int const>(a)), int>::value, ""); in test_cast_return_type() 57 static_assert(std::is_same<decltype(any_cast<int&>(a)), int&>::value, ""); in test_cast_return_type() 58 static_assert(std::is_same<decltype(any_cast<int const&>(a)), int const&>::value, ""); in test_cast_return_type() 60 static_assert(std::is_same<decltype(any_cast<int&&>(a)), int&&>::value, ""); in test_cast_return_type() 61 static_assert(std::is_same<decltype(any_cast<int const&&>(a)), int const&&>::value, ""); in test_cast_return_type() [all …]
|
D | reference_types.fail.cpp | 23 using std::any_cast; 30 any_cast<int &>(&a); // expected-note {{requested here}} in main() 33 any_cast<int &&>(&a); // expected-note {{requested here}} in main() 36 any_cast<int const &>(&a); // expected-note {{requested here}} in main() 39 any_cast<int const&&>(&a); // expected-note {{requested here}} in main() 44 any_cast<int &>(&a2); // expected-note {{requested here}} in main() 47 any_cast<int &&>(&a2); // expected-note {{requested here}} in main() 50 any_cast<int const &>(&a2); // expected-note {{requested here}} in main() 53 any_cast<int const &&>(&a2); // expected-note {{requested here}} in main()
|
D | any_cast_request_invalid_value_category.fail.cpp | 23 using std::any_cast; 34 any_cast<TestType &>(a); // expected-note {{requested here}} in test_const_lvalue_cast_request_non_const_lvalue() 39 any_cast<int&>(a2); // expected-note {{requested here}} in test_const_lvalue_cast_request_non_const_lvalue() 46 any_cast<TestType &&>(a); // expected-note {{requested here}} in test_lvalue_any_cast_request_rvalue() 50 any_cast<int&&>(a2); // expected-note {{requested here}} in test_lvalue_any_cast_request_rvalue() 58 any_cast<TestType &>(std::move(a)); // expected-note {{requested here}} in test_rvalue_any_cast_request_lvalue() 62 any_cast<int&>(42); in test_rvalue_any_cast_request_lvalue()
|
D | const_correctness.fail.cpp | 31 using std::any_cast; in main() 37 any_cast<TestType &>(static_cast<any const&>(a)); // expected-note {{requested here}} in main() 41 any_cast<TestType &&>(static_cast<any const&>(a)); // expected-note {{requested here}} in main() 45 any_cast<TestType2 &>(static_cast<any const&&>(a)); // expected-note {{requested here}} in main() 49 any_cast<TestType2 &&>(static_cast<any const&&>(a)); // expected-note {{requested here}} in main()
|
D | not_copy_constructible.fail.cpp | 28 using std::any_cast; 51 any_cast<no_copy>(static_cast<any&>(a)); // expected-note {{requested here}} in main() 55 any_cast<no_copy>(static_cast<any const&>(a)); // expected-note {{requested here}} in main() 57 any_cast<no_copy>(static_cast<any &&>(a)); // OK in main() 61 any_cast<no_move>(static_cast<any &&>(a)); in main()
|
/external/swiftshader/third_party/llvm-7.0/llvm/unittests/ADT/ |
D | AnyTest.cpp | 87 EXPECT_EQ(7, llvm::any_cast<int>(B)); in TEST() 88 EXPECT_EQ(7, llvm::any_cast<int>(B)); in TEST() 90 EXPECT_STREQ("hello", llvm::any_cast<const char *>(D)); in TEST() 91 EXPECT_STREQ("hello", llvm::any_cast<const char *>(D)); in TEST() 93 EXPECT_EQ('x', llvm::any_cast<char>(E)); in TEST() 94 EXPECT_EQ('x', llvm::any_cast<char>(E)); in TEST() 97 EXPECT_EQ(7, llvm::any_cast<int>(F)); in TEST() 98 EXPECT_EQ(7, llvm::any_cast<int>(F)); in TEST() 101 EXPECT_EQ(8, llvm::any_cast<int>(G)); in TEST() 102 EXPECT_EQ(8, llvm::any_cast<int>(G)); in TEST() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/ADT/ |
D | Any.h | 92 template <class T> friend T any_cast(const Any &Value); 93 template <class T> friend T any_cast(Any &Value); 94 template <class T> friend T any_cast(Any &&Value); 95 template <class T> friend const T *any_cast(const Any *Value); 96 template <class T> friend T *any_cast(Any *Value); 113 template <class T> T any_cast(const Any &Value) { in any_cast() function 116 return static_cast<T>(*any_cast<U>(&Value)); in any_cast() 119 template <class T> T any_cast(Any &Value) { in any_cast() function 122 return static_cast<T>(*any_cast<U>(&Value)); in any_cast() 125 template <class T> T any_cast(Any &&Value) { in any_cast() function [all …]
|
/external/libcxx/test/std/utilities/any/any.class/any.modifiers/ |
D | emplace.pass.cpp | 34 using std::any_cast; 55 assert(&v == std::any_cast<Type>(&a)); in test_emplace_type() 71 assert(&v == std::any_cast<Type>(&a)); in test_emplace_type() 87 assert(&v == std::any_cast<Type>(&a)); in test_emplace_type() 108 assert(&v == std::any_cast<Type>(&a)); in test_emplace_type_tracked() 118 assert(&v == std::any_cast<Type>(&a)); in test_emplace_type_tracked() 129 assert(&v == std::any_cast<Type>(&a)); in test_emplace_type_tracked() 140 assert(&v == std::any_cast<Type>(&a)); in test_emplace_type_tracked()
|
D | reset.pass.cpp | 32 using std::any_cast; in main()
|
D | swap.pass.cpp | 32 using std::any_cast;
|
/external/libcxx/test/std/utilities/any/any.nonmembers/ |
D | swap.pass.cpp | 30 using std::any_cast; 45 assert(any_cast<int>(a1) == 2); in main() 46 assert(any_cast<int>(a2) == 1); in main()
|
D | make_any.pass.cpp | 34 using std::any_cast;
|
/external/libcxx/include/ |
D | any | 69 ValueType any_cast(const any& operand); 71 ValueType any_cast(any& operand); 73 ValueType any_cast(any&& operand); 76 const ValueType* any_cast(const any* operand) noexcept; 78 ValueType* any_cast(any* operand) noexcept; 125 any_cast(any const *) _NOEXCEPT; 129 add_pointer_t<_ValueType> any_cast(any *) _NOEXCEPT; 332 any_cast(any const *) _NOEXCEPT; 336 any_cast(any *) _NOEXCEPT; 582 _ValueType any_cast(any const & __v) [all …]
|
/external/libcxx/test/std/utilities/any/any.class/any.cons/ |
D | in_place_type.pass.cpp | 42 using std::any_cast; 124 assert(any_cast<DecayT>(a) == test_func); in test_in_place_type_decayed() 132 assert(any_cast<DecayT>(a) == my_arr); in test_in_place_type_decayed() 139 assert(any_cast<DecayT>(a) == nullptr); in test_in_place_type_decayed()
|
D | copy.pass.cpp | 32 using std::any_cast;
|
D | move.pass.cpp | 34 using std::any_cast;
|
D | value.pass.cpp | 39 using std::any_cast;
|
/external/libcxx/test/support/ |
D | any_helpers.h | 42 return a.has_value() && std::any_cast<T>(&a) != nullptr; in containsType() 59 assert(any_cast<LastType const>(&a) == nullptr); in assertEmpty() 75 assert(std::any_cast<Type const &>(a).value == value); in assertContains() 84 assert(std::any_cast<Type const &>(a) == value); in assertContains() 97 any_cast<Type&>(a).value = value; in modifyValue() 430 assert(any_cast<Type const &>(a).arg_types == &makeArgumentID<Args...>()); in assertArgsMatch()
|
D | experimental_any_helpers.h | 53 assert(std::experimental::any_cast<LastType const>(&a) == nullptr); in assertEmpty() 62 assert(std::experimental::any_cast<Type const &>(a).value == value); 72 std::experimental::any_cast<Type&>(a).value = value; in modifyValue()
|
/external/libcxx/test/std/utilities/any/any.class/any.assign/ |
D | move.pass.cpp | 33 using std::any_cast;
|
D | copy.pass.cpp | 34 using std::any_cast;
|
D | value.pass.cpp | 35 using std::any_cast;
|
/external/googletest/googlemock/include/gmock/ |
D | gmock-matchers.h | 3353 void any_cast() {} 3366 const T* ptr = any_cast<T>(&value); 3370 const T* elem = any_cast<T>(&value);
|
/external/googletest/googlemock/test/ |
D | gmock-matchers_test.cc | 6763 friend const T* any_cast(const SampleAnyType* any) { in any_cast() function
|