[Bug c++/102258] dynamic_cast to derived type fails during constant evaluation

2022-10-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102258 Andrew Pinski changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c++/102258] dynamic_cast to derived type fails during constant evaluation

2021-09-09 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102258 --- Comment #2 from Johel Ernesto Guerrero Peña --- That still doesn't work because you can't compare (the addresses of) different `std::type_info` objects.

[Bug c++/102258] dynamic_cast to derived type fails during constant evaluation

2021-09-09 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102258 --- Comment #1 from Johel Ernesto Guerrero Peña --- Workaround for my use-case: https://godbolt.org/z/5Woe8dvan. ```C++ #include #include #include #include #include struct B { virtual ~B() = default; }; struct D : B { int x{1}; constexpr