| 212 | // test constant evaluation works |
| 213 | template <class T> |
| 214 | consteval void test_consteval() |
| 215 | { |
| 216 | any::__any<ibaz> m(foobar<T>{}); |
| 217 | [[maybe_unused]] |
| 218 | auto x = any::__any_static_cast<foobar<T>>(m); |
| 219 | x = any::__any_cast<foobar<T>>(m); |
| 220 | m.foo(); |
| 221 | [[maybe_unused]] |
| 222 | auto n = m; |
| 223 | [[maybe_unused]] |
| 224 | auto p = any::__caddressof(m); |
| 225 | |
| 226 | any::__any<any::__iequality_comparable> a = 42; |
| 227 | if (a != a) |
| 228 | throw "error"; |
| 229 | |
| 230 | any::__any_ptr<ibaz> pifoo = any::__addressof(m); |
| 231 | [[maybe_unused]] |
| 232 | auto y = any::__any_cast<foobar<T>>(pifoo); |
| 233 | } |
| 234 | |
| 235 | template <class Base> |
| 236 | struct iempty : any::__interface_base<iempty, Base, any::__extends<>, 0> |