Message ID | 20240823124055.964684-1-jwakely@redhat.com |
---|---|
State | New |
Headers | show |
Series | [committed,v2] libstdc++: Optimize __try_use_facet for const types | expand |
diff --git a/libstdc++-v3/include/bits/locale_classes.tcc b/libstdc++-v3/include/bits/locale_classes.tcc index c79574e58de..d5ef1911057 100644 --- a/libstdc++-v3/include/bits/locale_classes.tcc +++ b/libstdc++-v3/include/bits/locale_classes.tcc @@ -110,7 +110,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // We know these standard facets are always installed in every locale // so dynamic_cast always succeeds, just use static_cast instead. #define _GLIBCXX_STD_FACET(...) \ - if _GLIBCXX_CONSTEXPR (__is_same(_Facet, __VA_ARGS__)) \ + if _GLIBCXX_CONSTEXPR (__is_same(const _Facet, const __VA_ARGS__)) \ return static_cast<const _Facet*>(__facets[__i]) _GLIBCXX_STD_FACET(ctype<char>);