diff options
Diffstat (limited to 'contrib/libstdc++/include/bits')
-rw-r--r-- | contrib/libstdc++/include/bits/ostream.tcc | 3 | ||||
-rw-r--r-- | contrib/libstdc++/include/bits/ostream_insert.h | 12 |
2 files changed, 12 insertions, 3 deletions
diff --git a/contrib/libstdc++/include/bits/ostream.tcc b/contrib/libstdc++/include/bits/ostream.tcc index 36853e8..c7a2e91 100644 --- a/contrib/libstdc++/include/bits/ostream.tcc +++ b/contrib/libstdc++/include/bits/ostream.tcc @@ -334,7 +334,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) extern template ostream& operator<<(ostream&, const char*); extern template ostream& operator<<(ostream&, const unsigned char*); extern template ostream& operator<<(ostream&, const signed char*); - extern template ostream& __ostream_insert(ostream&, const char*, streamsize); extern template ostream& ostream::_M_insert(long); extern template ostream& ostream::_M_insert(unsigned long); @@ -356,8 +355,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) extern template wostream& operator<<(wostream&, char); extern template wostream& operator<<(wostream&, const wchar_t*); extern template wostream& operator<<(wostream&, const char*); - extern template wostream& __ostream_insert(wostream&, const wchar_t*, - streamsize); extern template wostream& wostream::_M_insert(long); extern template wostream& wostream::_M_insert(unsigned long); diff --git a/contrib/libstdc++/include/bits/ostream_insert.h b/contrib/libstdc++/include/bits/ostream_insert.h index f3ed801..e9e83fb 100644 --- a/contrib/libstdc++/include/bits/ostream_insert.h +++ b/contrib/libstdc++/include/bits/ostream_insert.h @@ -109,6 +109,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return __out; } + // Inhibit implicit instantiations for required instantiations, + // which are defined via explicit instantiations elsewhere. + // NB: This syntax is a GNU extension. +#if _GLIBCXX_EXTERN_TEMPLATE + extern template ostream& __ostream_insert(ostream&, const char*, streamsize); + +#ifdef _GLIBCXX_USE_WCHAR_T + extern template wostream& __ostream_insert(wostream&, const wchar_t*, + streamsize); +#endif +#endif + _GLIBCXX_END_NAMESPACE #endif /* _OSTREAM_INSERT_H */ |