aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/src/c++98
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2017-02-03 18:59:05 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2017-02-03 18:59:05 +0000
commitb333e8ebb0d4b63acd52249b350de410e6f77e5f (patch)
treea04fd957ad83f6c28b7889bbfda9bd14486ac2be /libstdc++-v3/src/c++98
parentd5d9703a2caeb411411e02a102756493587073a6 (diff)
downloadgcc-b333e8ebb0d4b63acd52249b350de410e6f77e5f.zip
gcc-b333e8ebb0d4b63acd52249b350de410e6f77e5f.tar.gz
gcc-b333e8ebb0d4b63acd52249b350de410e6f77e5f.tar.bz2
PR libstdc++/60936 reduce coupling between objects in libstdc++.a
Move explicit instantiation definitions for string I/O functions into their own files so that iostream and locale definitions are not needed for uses of strings without I/O. Move functions for throwing C++11 exceptions into the individual files defining the exception types, so that using any of the functions from functexcept.cc doesn't pull in large pieces of the C++11 library. Finally, avoid using __int_to_char in snprintf_lite.cc to avoid pulling in locale-inst.cc for one function. PR libstdc++/60936 * src/c++11/Makefile.am: Add new files. * src/c++11/Makefile.in: Regenerate. * src/c++11/cow-string-inst.cc [!_GLIBCXX_USE_CXX11_ABI] (operator<<, operator>>, getline): Move explicit instantiations to ... * src/c++11/cow-string-io-inst.cc: ... new file. * src/c++11/cow-wstring-inst.cc [!_GLIBCXX_USE_CXX11_ABI] (operator<<, operator>>, getline): Move explicit instantiations to ... * src/c++11/cow-wstring-io-inst.cc: ... new file. * src/c++11/functexcept.cc (__throw_ios_failure, __throw_system_error) (__throw_future_error, __throw_bad_function_call): (__throw_regex_error): Move functions for C++11 exceptions to the files that define the exception types. * src/c++11/functional.cc (__throw_bad_function_call): Move here. * src/c++11/future.cc (__throw_future_error): Likewise. * src/c++11/ios.cc (__throw_ios_failure): Likewise. * src/c++11/regex.cc (__throw_regex_error): Likewise. * src/c++11/snprintf_lite.cc (__concat_size_t): Print decimal representation directly instead of calling __int_to_char. * src/c++11/sso_string.cc (__sso_string): New file for definition of __sso_string type. * src/c++11/string-io-inst.cc [_GLIBCXX_USE_CXX11_ABI]: New file for explicit instantiations of narrow string I/O functions. * src/c++11/system_error.cc (__throw_system_error): Move here. (__sso_string): Move to new file. * src/c++11/wstring-io-inst.cc [_GLIBCXX_USE_CXX11_ABI]: New file for explicit instantiations of wide string I/O functions. * src/c++98/misc-inst.cc [_GLIBCXX_USE_CXX11_ABI] (operator<<) (operator>>, getline): Remove explicit instantiations from here. From-SVN: r245162
Diffstat (limited to 'libstdc++-v3/src/c++98')
-rw-r--r--libstdc++-v3/src/c++98/misc-inst.cc28
1 files changed, 0 insertions, 28 deletions
diff --git a/libstdc++-v3/src/c++98/misc-inst.cc b/libstdc++-v3/src/c++98/misc-inst.cc
index 91c02bf..a0c5912 100644
--- a/libstdc++-v3/src/c++98/misc-inst.cc
+++ b/libstdc++-v3/src/c++98/misc-inst.cc
@@ -36,34 +36,6 @@ namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
- // string related to iostreams
- template
- basic_istream<char>&
- operator>>(basic_istream<char>&, string&);
- template
- basic_ostream<char>&
- operator<<(basic_ostream<char>&, const string&);
- template
- basic_istream<char>&
- getline(basic_istream<char>&, string&, char);
- template
- basic_istream<char>&
- getline(basic_istream<char>&, string&);
-#ifdef _GLIBCXX_USE_WCHAR_T
- template
- basic_istream<wchar_t>&
- operator>>(basic_istream<wchar_t>&, wstring&);
- template
- basic_ostream<wchar_t>&
- operator<<(basic_ostream<wchar_t>&, const wstring&);
- template
- basic_istream<wchar_t>&
- getline(basic_istream<wchar_t>&, wstring&, wchar_t);
- template
- basic_istream<wchar_t>&
- getline(basic_istream<wchar_t>&, wstring&);
-#endif
-
#if _GLIBCXX_USE_CXX11_ABI
// C++98 members that are not instantiated by src/c++11/string-inst.cc
// because they changed in C++11 to take const_iterator parameters.