Home
last modified time | relevance | path

Searched refs:any_cast (Results 1 – 25 of 79) sorted by relevance

1234

/third_party/boost/libs/type_erasure/test/
Dtest_any_cast.cpp33 BOOST_CHECK_EQUAL(any_cast<int>(x), 2); in BOOST_AUTO_TEST_CASE()
34 BOOST_CHECK_THROW(any_cast<double>(x), bad_any_cast); in BOOST_AUTO_TEST_CASE()
36 BOOST_CHECK_EQUAL(any_cast<int>(y), 2); in BOOST_AUTO_TEST_CASE()
37 BOOST_CHECK_THROW(any_cast<double>(y), bad_any_cast); in BOOST_AUTO_TEST_CASE()
44 BOOST_CHECK_EQUAL(any_cast<int&>(x), 2); in BOOST_AUTO_TEST_CASE()
45 BOOST_CHECK_EQUAL(any_cast<const int&>(x), 2); in BOOST_AUTO_TEST_CASE()
46 BOOST_CHECK_THROW(any_cast<double&>(x), bad_any_cast); in BOOST_AUTO_TEST_CASE()
47 BOOST_CHECK_THROW(any_cast<const double&>(x), bad_any_cast); in BOOST_AUTO_TEST_CASE()
50 BOOST_CHECK_EQUAL(any_cast<const int&>(y), 2); in BOOST_AUTO_TEST_CASE()
52 BOOST_CHECK_THROW(any_cast<const double&>(y), bad_any_cast); in BOOST_AUTO_TEST_CASE()
[all …]
Dtest_dynamic_any_cast.cpp46 BOOST_CHECK_EQUAL(any_cast<int>(y), 1); in BOOST_AUTO_TEST_CASE()
55 BOOST_CHECK_EQUAL(any_cast<int>(y), 2); in BOOST_AUTO_TEST_CASE()
64 BOOST_CHECK_EQUAL(any_cast<int>(y), 2); in BOOST_AUTO_TEST_CASE()
73 BOOST_CHECK_EQUAL(any_cast<int>(y), 2); in BOOST_AUTO_TEST_CASE()
91 BOOST_CHECK_EQUAL(any_cast<int>(y), 2); in BOOST_AUTO_TEST_CASE()
100 BOOST_CHECK_EQUAL(any_cast<int>(y), 1); in BOOST_AUTO_TEST_CASE()
117 BOOST_CHECK_EQUAL(any_cast<int>(z), 3); in BOOST_AUTO_TEST_CASE()
129 BOOST_CHECK_EQUAL(any_cast<int>(z), 3); in BOOST_AUTO_TEST_CASE()
141 BOOST_CHECK_EQUAL(any_cast<int>(z), 3); in BOOST_AUTO_TEST_CASE()
154 BOOST_CHECK_EQUAL(any_cast<int>(x), any_cast<int>(y1)); in BOOST_AUTO_TEST_CASE()
[all …]
Dtest_construct_cref.cpp37 BOOST_CHECK_EQUAL(any_cast<const int*>(&x), &i); in BOOST_AUTO_TEST_CASE()
45 BOOST_CHECK_EQUAL(any_cast<const int*>(&x), &i); in BOOST_AUTO_TEST_CASE()
53 BOOST_CHECK_EQUAL(any_cast<const int*>(&x), &i); in BOOST_AUTO_TEST_CASE()
55 BOOST_CHECK_EQUAL(any_cast<const int*>(&y), &i); in BOOST_AUTO_TEST_CASE()
57 BOOST_CHECK_EQUAL(any_cast<const int*>(&z), &i); in BOOST_AUTO_TEST_CASE()
59 BOOST_CHECK_EQUAL(any_cast<const int*>(&w), &i); in BOOST_AUTO_TEST_CASE()
68 BOOST_CHECK_EQUAL(any_cast<const int*>(&x), &i); in BOOST_AUTO_TEST_CASE()
70 BOOST_CHECK_EQUAL(any_cast<const int*>(&y), &i); in BOOST_AUTO_TEST_CASE()
72 BOOST_CHECK_EQUAL(any_cast<const int*>(&z), &i); in BOOST_AUTO_TEST_CASE()
74 BOOST_CHECK_EQUAL(any_cast<const int*>(&w), &i); in BOOST_AUTO_TEST_CASE()
[all …]
Dtest_construct_ref.cpp37 BOOST_CHECK_EQUAL(any_cast<int*>(&x), &i); in BOOST_AUTO_TEST_CASE()
45 BOOST_CHECK_EQUAL(any_cast<int*>(&x), &i); in BOOST_AUTO_TEST_CASE()
53 BOOST_CHECK_EQUAL(any_cast<int*>(&x), &i); in BOOST_AUTO_TEST_CASE()
55 BOOST_CHECK_EQUAL(any_cast<int*>(&y), &i); in BOOST_AUTO_TEST_CASE()
57 BOOST_CHECK_EQUAL(any_cast<int*>(&z), &i); in BOOST_AUTO_TEST_CASE()
59 BOOST_CHECK_EQUAL(any_cast<int*>(&w), &i); in BOOST_AUTO_TEST_CASE()
68 BOOST_CHECK_EQUAL(any_cast<int*>(&x), &i); in BOOST_AUTO_TEST_CASE()
70 BOOST_CHECK_EQUAL(any_cast<int*>(&y), &i); in BOOST_AUTO_TEST_CASE()
72 BOOST_CHECK_EQUAL(any_cast<int*>(&z), &i); in BOOST_AUTO_TEST_CASE()
74 BOOST_CHECK_EQUAL(any_cast<int*>(&w), &i); in BOOST_AUTO_TEST_CASE()
[all …]
Dtest_construct.cpp34 BOOST_CHECK_EQUAL(any_cast<int>(x), 1); in BOOST_AUTO_TEST_CASE()
46 BOOST_CHECK_EQUAL(any_cast<char *>(x1), &array[0]); in BOOST_AUTO_TEST_CASE()
47 BOOST_CHECK(any_cast<void(*)()>(y1) == &func); in BOOST_AUTO_TEST_CASE()
48 BOOST_CHECK_EQUAL(any_cast<const char *>(z1), &carray[0]); in BOOST_AUTO_TEST_CASE()
53 BOOST_CHECK_EQUAL(any_cast<char *>(x2), &array[0]); in BOOST_AUTO_TEST_CASE()
54 BOOST_CHECK(any_cast<void(*)()>(y2) == &func); in BOOST_AUTO_TEST_CASE()
55 BOOST_CHECK_EQUAL(any_cast<const char *>(z2), &carray[0]); in BOOST_AUTO_TEST_CASE()
63 BOOST_CHECK_EQUAL(any_cast<char *>(x3), &array[0]); in BOOST_AUTO_TEST_CASE()
64 BOOST_CHECK(any_cast<void(*)()>(y3) == &func); in BOOST_AUTO_TEST_CASE()
65 BOOST_CHECK_EQUAL(any_cast<const char *>(z3), &carray[0]); in BOOST_AUTO_TEST_CASE()
[all …]
Dtest_add.cpp36 int i = any_cast<int>(z); in BOOST_AUTO_TEST_CASE()
45 int i = any_cast<int>(z); in BOOST_AUTO_TEST_CASE()
54 int i = any_cast<int>(z); in BOOST_AUTO_TEST_CASE()
63 double d = any_cast<double>(z); in BOOST_AUTO_TEST_CASE()
86 BOOST_CHECK_EQUAL(any_cast<double>(z), 2.0); in BOOST_AUTO_TEST_CASE()
91 BOOST_CHECK_EQUAL(any_cast<double>(z), 4.0); in BOOST_AUTO_TEST_CASE()
96 BOOST_CHECK_EQUAL(any_cast<double>(z), 4.0); in BOOST_AUTO_TEST_CASE()
101 BOOST_CHECK_EQUAL(any_cast<int>(z), 4); in BOOST_AUTO_TEST_CASE()
106 BOOST_CHECK_EQUAL(any_cast<int>(z), 5); in BOOST_AUTO_TEST_CASE()
111 BOOST_CHECK_EQUAL(any_cast<int>(z), 5); in BOOST_AUTO_TEST_CASE()
[all …]
Dtest_tuple.cpp46 BOOST_CHECK_EQUAL(any_cast<int&>(get<0>(t)), 1); in BOOST_AUTO_TEST_CASE()
47 BOOST_CHECK_EQUAL(any_cast<int&>(get<1>(t)), 2); in BOOST_AUTO_TEST_CASE()
62 BOOST_CHECK_EQUAL(any_cast<double&>(boost::fusion::at_c<0>(t)), 2.0); in BOOST_AUTO_TEST_CASE()
63 BOOST_CHECK_EQUAL(any_cast<int&>(boost::fusion::at_c<1>(t)), 1); in BOOST_AUTO_TEST_CASE()
64 BOOST_CHECK_EQUAL(any_cast<double&>(boost::fusion::front(t)), 2.0); in BOOST_AUTO_TEST_CASE()
65 BOOST_CHECK_EQUAL(any_cast<int&>(boost::fusion::back(t)), 1); in BOOST_AUTO_TEST_CASE()
73 BOOST_CHECK_EQUAL(any_cast<double&>(boost::fusion::deref(boost::fusion::begin(t))), 2.0); in BOOST_AUTO_TEST_CASE()
80 BOOST_CHECK_EQUAL(any_cast<const double&>(boost::fusion::at_c<0>(t)), 2.0); in BOOST_AUTO_TEST_CASE()
81 BOOST_CHECK_EQUAL(any_cast<const int&>(boost::fusion::at_c<1>(t)), 1); in BOOST_AUTO_TEST_CASE()
82 BOOST_CHECK_EQUAL(any_cast<const double&>(boost::fusion::front(t)), 2.0); in BOOST_AUTO_TEST_CASE()
[all …]
Dtest_add_assign.cpp36 BOOST_CHECK_EQUAL(any_cast<int>(x), 3); in BOOST_AUTO_TEST_CASE()
45 BOOST_CHECK_EQUAL(any_cast<int>(x), 3); in BOOST_AUTO_TEST_CASE()
66 BOOST_CHECK_EQUAL(any_cast<double>(x), 3.0); in BOOST_AUTO_TEST_CASE()
89 BOOST_CHECK_EQUAL(any_cast<double>(x), 2.0); in BOOST_AUTO_TEST_CASE()
97 BOOST_CHECK_EQUAL(any_cast<double>(x), 6.0); in BOOST_AUTO_TEST_CASE()
113 BOOST_CHECK_EQUAL(any_cast<int>(x), 4); in BOOST_AUTO_TEST_CASE()
121 BOOST_CHECK_EQUAL(any_cast<int>(x), 7); in BOOST_AUTO_TEST_CASE()
137 BOOST_CHECK_EQUAL(any_cast<double>(x), 3.0); in BOOST_AUTO_TEST_CASE()
Dtest_increment.cpp35 BOOST_CHECK_EQUAL(any_cast<int>(x), 2); in BOOST_AUTO_TEST_CASE()
37 BOOST_CHECK_EQUAL(any_cast<int>(x), 3); in BOOST_AUTO_TEST_CASE()
38 BOOST_CHECK_EQUAL(any_cast<int>(y), 2); in BOOST_AUTO_TEST_CASE()
50 BOOST_CHECK_EQUAL(any_cast<int>(y), 2); in BOOST_AUTO_TEST_CASE()
Dtest_nested.cpp37 test_class result = { lhs.i + any_cast<int>(rhs) }; in operator +()
48 BOOST_CHECK_EQUAL(any_cast<test_class>(y).i, 3); in BOOST_AUTO_TEST_CASE()
59 BOOST_CHECK_EQUAL(any_cast<test_class>(y).i, 3); in BOOST_AUTO_TEST_CASE()
Dtest_reference.cpp47 no_destroy& ref = any_cast<no_destroy&>(x); in BOOST_AUTO_TEST_CASE()
68 int k = any_cast<int>(z); in BOOST_AUTO_TEST_CASE()
80 int k = any_cast<int>(z); in BOOST_AUTO_TEST_CASE()
Dtest_same_type.cpp39 BOOST_CHECK_EQUAL(&any_cast<int&>(y), &i); in BOOST_AUTO_TEST_CASE()
63 BOOST_CHECK_EQUAL(&any_cast<int&>(y), &i); in BOOST_AUTO_TEST_CASE()
86 BOOST_CHECK_EQUAL(&any_cast<int&>(y2), &i); in BOOST_AUTO_TEST_CASE()
/third_party/skia/third_party/externals/abseil-cpp/absl/types/
Dany_test.cc99 static_assert(noexcept(absl::any_cast<int>(std::declval<absl::any*>())), ""); in TEST()
134 EXPECT_EQ(nullptr, absl::any_cast<int>(&o)); in TEST()
136 EXPECT_NE(nullptr, absl::any_cast<int>(&o)); in TEST()
138 EXPECT_EQ(nullptr, absl::any_cast<int>(&o)); in TEST()
144 EXPECT_EQ(nullptr, absl::any_cast<int>(&AsConst(o))); in TEST()
146 EXPECT_NE(nullptr, absl::any_cast<int>(&AsConst(o))); in TEST()
148 EXPECT_EQ(nullptr, absl::any_cast<int>(&AsConst(o))); in TEST()
156 IntMoveOnlyCopyOnly& v = absl::any_cast<IntMoveOnlyCopyOnly&>(o); in TEST()
164 auto& v = absl::any_cast<IntMoveOnlyCopyOnly&>(o); in TEST()
172 IntMoveOnlyCopyOnly& v = absl::any_cast<IntMoveOnlyCopyOnly&>(o); in TEST()
[all …]
Dany.h66 using std::any_cast;
132 ValueType any_cast(const any& operand);
139 ValueType any_cast(any& operand); // NOLINT(runtime/references)
145 ValueType any_cast(any&& operand);
151 const ValueType* any_cast(const any* operand) noexcept;
157 ValueType* any_cast(any* operand) noexcept;
418 friend ValueType any_cast(const any& operand);
422 friend ValueType any_cast(any& operand); // NOLINT(runtime/references)
426 friend const T* any_cast(const any* operand) noexcept;
430 friend T* any_cast(any* operand) noexcept;
[all …]
/third_party/abseil-cpp/absl/types/
Dany_test.cc99 static_assert(noexcept(absl::any_cast<int>(std::declval<absl::any*>())), ""); in TEST()
134 EXPECT_EQ(nullptr, absl::any_cast<int>(&o)); in TEST()
136 EXPECT_NE(nullptr, absl::any_cast<int>(&o)); in TEST()
138 EXPECT_EQ(nullptr, absl::any_cast<int>(&o)); in TEST()
144 EXPECT_EQ(nullptr, absl::any_cast<int>(&AsConst(o))); in TEST()
146 EXPECT_NE(nullptr, absl::any_cast<int>(&AsConst(o))); in TEST()
148 EXPECT_EQ(nullptr, absl::any_cast<int>(&AsConst(o))); in TEST()
156 IntMoveOnlyCopyOnly& v = absl::any_cast<IntMoveOnlyCopyOnly&>(o); in TEST()
164 auto& v = absl::any_cast<IntMoveOnlyCopyOnly&>(o); in TEST()
172 IntMoveOnlyCopyOnly& v = absl::any_cast<IntMoveOnlyCopyOnly&>(o); in TEST()
[all …]
Dany.h66 using std::any_cast;
132 ValueType any_cast(const any& operand);
139 ValueType any_cast(any& operand); // NOLINT(runtime/references)
145 ValueType any_cast(any&& operand);
151 const ValueType* any_cast(const any* operand) noexcept;
157 ValueType* any_cast(any* operand) noexcept;
418 friend ValueType any_cast(const any& operand);
422 friend ValueType any_cast(any& operand); // NOLINT(runtime/references)
426 friend const T* any_cast(const any* operand) noexcept;
430 friend T* any_cast(any* operand) noexcept;
[all …]
/third_party/boost/libs/any/test/
Dany_test.cpp98 check_null(any_cast<int>(&value), "any_cast<int>"); in test_default_ctor()
109 check_null(any_cast<int>(&value), "any_cast<int>"); in test_converting_ctor()
110 check_non_null(any_cast<std::string>(&value), "any_cast<std::string>"); in test_converting_ctor()
112 any_cast<std::string>(value), text, in test_converting_ctor()
115 any_cast<std::string>(&value), &text, in test_converting_ctor()
127 any_cast<std::string>(original), any_cast<std::string>(copy), in test_copy_ctor()
130 text, any_cast<std::string>(copy), in test_copy_ctor()
133 any_cast<std::string>(&original), in test_copy_ctor()
134 any_cast<std::string>(&copy), in test_copy_ctor()
147 any_cast<std::string>(original), any_cast<std::string>(copy), in test_copy_assign()
[all …]
Dany_test_rv.cpp120 … check_non_null(any_cast<move_copy_conting_class>(&value), "any_cast<move_copy_conting_class>"); in test_move_construction()
140 … check_non_null(any_cast<move_copy_conting_class>(&value), "any_cast<move_copy_conting_class>"); in test_move_assignment()
159 … check_non_null(any_cast<move_copy_conting_class>(&value), "any_cast<move_copy_conting_class>"); in test_copy_construction()
179 … check_non_null(any_cast<move_copy_conting_class>(&value), "any_cast<move_copy_conting_class>"); in test_copy_assignment()
201 … check_non_null(any_cast<move_copy_conting_class>(&value), "any_cast<move_copy_conting_class>"); in test_move_construction_from_value()
228 … check_non_null(any_cast<move_copy_conting_class>(&value), "any_cast<move_copy_conting_class>"); in test_move_assignment_from_value()
250 … check_non_null(any_cast<move_copy_conting_class>(&value), "any_cast<move_copy_conting_class>"); in test_copy_construction_from_value()
270 … check_non_null(any_cast<move_copy_conting_class>(&value), "any_cast<move_copy_conting_class>"); in test_copy_assignment_from_value()
302 move_copy_conting_class value1 = any_cast<move_copy_conting_class&&>(value); in test_cast_to_rv()
Dany_test_mplif.cpp14 std::cout << boost::any_cast<int>(a) << '\n'; in main()
16 std::cout << boost::any_cast<double>(a) << '\n'; in main()
18 std::cout << std::boolalpha << boost::any_cast<bool>(a) << '\n'; in main()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/ADT/
DAny.h101 template <class T> friend T any_cast(const Any &Value);
102 template <class T> friend T any_cast(Any &Value);
103 template <class T> friend T any_cast(Any &&Value);
104 template <class T> friend const T *any_cast(const Any *Value);
105 template <class T> friend T *any_cast(Any *Value);
122 template <class T> T any_cast(const Any &Value) { in any_cast() function
125 return static_cast<T>(*any_cast<U>(&Value)); in any_cast()
128 template <class T> T any_cast(Any &Value) { in any_cast() function
131 return static_cast<T>(*any_cast<U>(&Value)); in any_cast()
134 template <class T> T any_cast(Any &&Value) { in any_cast() function
[all …]
/third_party/boost/libs/poly_collection/test/
Dany_types.hpp72 using boost::type_erasure::any_cast; in operator ()()
74 if(auto p=any_cast<t1*>(&x))return (*this)(*p); in operator ()()
75 if(auto p=any_cast<t2*>(&x))return (*this)(*p); in operator ()()
76 if(auto p=any_cast<t3*>(&x))return (*this)(*p); in operator ()()
77 if(auto p=any_cast<t4*>(&x))return (*this)(*p); in operator ()()
78 if(auto p=any_cast<t5*>(&x))return (*this)(*p); in operator ()()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Passes/
DStandardInstrumentations.cpp36 return std::make_pair(any_cast<const Module *>(IR), std::string()); in unwrapModule()
39 const Function *F = any_cast<const Function *>(IR); in unwrapModule()
47 const LazyCallGraph::SCC *C = any_cast<const LazyCallGraph::SCC *>(IR); in unwrapModule()
59 const Loop *L = any_cast<const Loop *>(IR); in unwrapModule()
114 const Module *M = any_cast<const Module *>(IR); in unwrapAndPrint()
121 const Function *F = any_cast<const Function *>(IR); in unwrapAndPrint()
128 const LazyCallGraph::SCC *C = any_cast<const LazyCallGraph::SCC *>(IR); in unwrapAndPrint()
136 const Loop *L = any_cast<const Loop *>(IR); in unwrapAndPrint()
/third_party/boost/boost/spirit/home/support/detail/
Dhold_any.hpp406 friend T* any_cast(basic_hold_any<Char_> *);
417 inline T* any_cast (basic_hold_any<Char>* operand) in any_cast() function
428 inline T const* any_cast(basic_hold_any<Char> const* operand) in any_cast() function
430 return any_cast<T>(const_cast<basic_hold_any<Char>*>(operand)); in any_cast()
434 T any_cast(basic_hold_any<Char>& operand) in any_cast() function
439 nonref* result = any_cast<nonref>(&operand); in any_cast()
446 T const& any_cast(basic_hold_any<Char> const& operand) in any_cast() function
451 return any_cast<nonref const&>(const_cast<basic_hold_any<Char> &>(operand)); in any_cast()
/third_party/boost/boost/property_map/
Ddynamic_property_map.hpp149 key_type key_ = any_cast<key_type>(in_key); in do_put()
151 put(property_map_, key_, any_cast<value_type>(in_value)); in do_put()
154 std::string v = any_cast<std::string>(in_value); in do_put()
174 …return get_wrapper_xxx(property_map_, any_cast<typename boost::property_traits<PropertyMap>::key_t… in get()
180 …out << get_wrapper_xxx(property_map_, any_cast<typename boost::property_traits<PropertyMap>::key_t… in get_string()
309 return any_cast<Value>(i->second->get(key)); in get()
322 return any_cast<Value>(i->second->get(key)); in get()
/third_party/boost/boost/type_erasure/
Dany_cast.hpp119 T any_cast(any<Concept, Tag>& arg) in any_cast() function
134 T any_cast(const any<Concept, Tag>& arg) in any_cast() function
149 T any_cast(any<Concept, Tag>* arg) in any_cast() function
164 T any_cast(const any<Concept, Tag>* arg) in any_cast() function

1234