diff --git a/libstdc++-v3/include/bits/istream.tcc b/libstdc++-v3/include/bits/istream.tcc index 733a8359902..334a91755aa 100644 --- a/libstdc++-v3/include/bits/istream.tcc +++ b/libstdc++-v3/include/bits/istream.tcc @@ -102,7 +102,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ios_base::iostate __err = ios_base::goodbit; __try { +#ifndef _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT const __num_get_type& __ng = __check_facet(this->_M_num_get); +#else + const __num_get_type& __ng + = use_facet<__num_get_type>(this->_M_ios_locale); +#endif __ng.get(*this, 0, *this, __err, __v); } __catch(__cxxabiv1::__forced_unwind&) @@ -132,7 +137,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __try { long __l; +#ifndef _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT const __num_get_type& __ng = __check_facet(this->_M_num_get); +#else + const __num_get_type& __ng + = use_facet<__num_get_type>(this->_M_ios_locale); +#endif __ng.get(*this, 0, *this, __err, __l); // _GLIBCXX_RESOLVE_LIB_DEFECTS @@ -177,7 +187,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __try { long __l; +#ifndef _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT const __num_get_type& __ng = __check_facet(this->_M_num_get); +#else + const __num_get_type& __ng + = use_facet<__num_get_type>(this->_M_ios_locale); +#endif __ng.get(*this, 0, *this, __err, __l); // _GLIBCXX_RESOLVE_LIB_DEFECTS diff --git a/libstdc++-v3/include/bits/ostream.tcc b/libstdc++-v3/include/bits/ostream.tcc index e20012d2dc6..bb8584276f5 100644 --- a/libstdc++-v3/include/bits/ostream.tcc +++ b/libstdc++-v3/include/bits/ostream.tcc @@ -69,7 +69,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ios_base::iostate __err = ios_base::goodbit; __try { +#ifndef _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT const __num_put_type& __np = __check_facet(this->_M_num_put); +#else + const __num_put_type& __np + = use_facet<__num_put_type>(this->_M_ios_locale); +#endif if (__np.put(*this, *this, this->fill(), __v).failed()) __err |= ios_base::badbit; }