diff options
author | Paolo Carlini <pcarlini@suse.de> | 2007-05-06 18:51:10 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2007-05-06 18:51:10 +0000 |
commit | 74b332b8a0f8965b3cd153a58dd25421127d7394 (patch) | |
tree | 5424e781b2697ab5fab983baa8b992fd93ceec9e /libstdc++-v3/include | |
parent | 3fc0889aa7740d26efd760f65ef333b88ab7f859 (diff) | |
download | gcc-74b332b8a0f8965b3cd153a58dd25421127d7394.zip gcc-74b332b8a0f8965b3cd153a58dd25421127d7394.tar.gz gcc-74b332b8a0f8965b3cd153a58dd25421127d7394.tar.bz2 |
complex: Add missing extern template declarations.
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.
From-SVN: r124477
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 b91732b..04a6c69 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__ |