From: Benjamin Kosnik Date: Wed, 22 Jan 2003 21:18:00 +0000 (+0000) Subject: re PR libstdc++/9269 (libstdc++ headers: explicit specialization of function must... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b4ec7fc7f0de5ef2f80066f87b12a168a5625c5a;p=gcc.git re PR libstdc++/9269 (libstdc++ headers: explicit specialization of function must precede its first use) 2003-01-22 Benjamin Kosnik Sysoltsev Slawa Mark Mitchell PR libstdc++/9269 * include/std/std_fstream.h (basic_filebuf::uflow): Declare. (basic_filebuf::underflow): Declare. Move definitions. Co-Authored-By: Mark Mitchell Co-Authored-By: Sysoltsev Slawa From-SVN: r61616 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index fb4d7e24d2c..2b1e3a3ddff 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,12 @@ +2003-01-22 Benjamin Kosnik + Sysoltsev Slawa + Mark Mitchell + + PR libstdc++/9269 + * include/std/std_fstream.h (basic_filebuf::uflow): Declare. + (basic_filebuf::underflow): Declare. + Move definitions. + 2003-01-22 Benjamin Kosnik * include/bits/locale_facets.h: Move non-facet classes requiring diff --git a/libstdc++-v3/include/std/std_fstream.h b/libstdc++-v3/include/std/std_fstream.h index d2ddd047984..7731e49c8b2 100644 --- a/libstdc++-v3/include/std/std_fstream.h +++ b/libstdc++-v3/include/std/std_fstream.h @@ -235,11 +235,11 @@ namespace std // [documentation is inherited] virtual int_type - underflow() { return _M_underflow_common(false); } + underflow(); // [documentation is inherited] virtual int_type - uflow() { return _M_underflow_common(true); } + uflow(); // [documentation is inherited] virtual int_type @@ -435,7 +435,7 @@ namespace std } }; - // Explicit specializations, defined in src/fstream.cc. + // Explicit specialization declarations, defined in src/fstream.cc. template<> basic_filebuf::int_type basic_filebuf::_M_underflow_common(bool __bump); @@ -446,6 +446,18 @@ namespace std basic_filebuf::_M_underflow_common(bool __bump); #endif + // Generic definitions. + template + typename basic_filebuf<_CharT, _Traits>::int_type + basic_filebuf<_CharT, _Traits>::underflow() + { return _M_underflow_common(false); } + + template + typename basic_filebuf<_CharT, _Traits>::int_type + basic_filebuf<_CharT, _Traits>::uflow() + { return _M_underflow_common(true); } + + // [27.8.1.5] Template class basic_ifstream /** * @brief Controlling input for files.