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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
--- a/libstdc++-v3/src/c++11/cxx11-shim_facets.cc
+++ b/libstdc++-v3/src/c++11/cxx11-shim_facets.cc
@@ -768,9 +768,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   {
     using namespace __facet_shims;

+#if __cpp_rtti
     // If this is already a shim just use its underlying facet.
     if (auto* p = dynamic_cast<const __shim*>(this))
       return p->_M_get();
+#endif

     if (which == &numpunct<char>::id)
       return new numpunct_shim<char>{this};

Reply via email to