diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-05-06 18:51:10 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-05-06 18:51:10 +0000 |
commit | 7b2e5f5646a37c16c810b766b4822a9236d4b143 (patch) | |
tree | 5424e781b2697ab5fab983baa8b992fd93ceec9e /libstdc++-v3/include | |
parent | 818a0d9272367925e50ae326e9942d1680307148 (diff) | |
download | ppe42-gcc-7b2e5f5646a37c16c810b766b4822a9236d4b143.tar.gz ppe42-gcc-7b2e5f5646a37c16c810b766b4822a9236d4b143.zip |
2007-05-06 Paolo Carlini <pcarlini@suse.de>
* include/std/complex: Add missing extern template declarations.
* testsuite/26_numerics/complex/complex_inserters_extractors.cc:
Move...
* testsuite/26_numerics/complex/inserters_extractors/char/1.cc:
... here.
* testsuite/26_numerics/complex/inserters_extractors/wchar_t/1.cc:
New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124477 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r-- | libstdc++-v3/include/std/complex | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/libstdc++-v3/include/std/complex b/libstdc++-v3/include/std/complex index b91732b0c85..04a6c69ba75 100644 --- a/libstdc++-v3/include/std/complex +++ b/libstdc++-v3/include/std/complex @@ -1,6 +1,7 @@ // The template and inlines for the -*- C++ -*- complex number classes. -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, +// 2006, 2007 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -1484,6 +1485,27 @@ _GLIBCXX_BEGIN_NAMESPACE(std) complex<long double>::complex(const complex<double>& __z) : _M_value(__z.__rep()) { } + // 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 istream& operator>>(istream&, complex<float>&); + extern template ostream& operator<<(ostream&, const complex<float>&); + extern template istream& operator>>(istream&, complex<double>&); + extern template ostream& operator<<(ostream&, const complex<double>&); + extern template istream& operator>>(istream&, complex<long double>&); + extern template ostream& operator<<(ostream&, const complex<long double>&); + +#ifdef _GLIBCXX_USE_WCHAR_T + extern template wistream& operator>>(wistream&, complex<float>&); + extern template wostream& operator<<(wostream&, const complex<float>&); + extern template wistream& operator>>(wistream&, complex<double>&); + extern template wostream& operator<<(wostream&, const complex<double>&); + extern template wistream& operator>>(wistream&, complex<long double>&); + extern template wostream& operator<<(wostream&, const complex<long double>&); +#endif +#endif + _GLIBCXX_END_NAMESPACE #ifdef __GXX_EXPERIMENTAL_CXX0X__ |