https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113099

--- Comment #3 from andysem at mail dot ru ---
I think, a failing dynamic_cast would not be useful as this would make
std::use_facet unusable with -fno-rtti.

Re. ODR violation in the latest code, while it is true that the
dynamic/static_cast is not reachable for the standard facets, it is still part
of the function definition and the compiler is free to generate code that takes
it into account. Note that the shortcuts for the standard facets are
implemented with conditional if-constexpr, which will turn into regular ifs if
libstdc++ is compiled in pre-C++17 mode. Which, I think, is the default, isn't
it? I think, the ODR violation is still worth fixing.

Reply via email to