|
42 | 42 | #include <bits/cpp_type_traits.h>
|
43 | 43 | #include <ext/type_traits.h>
|
44 | 44 | #include <cmath>
|
45 |
| -#include <sstream> |
46 | 45 |
|
47 | 46 | // Get rid of a macro possibly defined in <complex.h>
|
48 | 47 | #undef complex
|
@@ -494,73 +493,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
494 | 493 | #endif
|
495 | 494 | //@}
|
496 | 495 |
|
497 |
| - /// Extraction operator for complex values. |
498 |
| - template<typename _Tp, typename _CharT, class _Traits> |
499 |
| - basic_istream<_CharT, _Traits>& |
500 |
| - operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) |
501 |
| - { |
502 |
| - bool __fail = true; |
503 |
| - _CharT __ch; |
504 |
| - if (__is >> __ch) |
505 |
| - { |
506 |
| - if (_Traits::eq(__ch, __is.widen('('))) |
507 |
| - { |
508 |
| - _Tp __u; |
509 |
| - if (__is >> __u >> __ch) |
510 |
| - { |
511 |
| - const _CharT __rparen = __is.widen(')'); |
512 |
| - if (_Traits::eq(__ch, __rparen)) |
513 |
| - { |
514 |
| - __x = __u; |
515 |
| - __fail = false; |
516 |
| - } |
517 |
| - else if (_Traits::eq(__ch, __is.widen(','))) |
518 |
| - { |
519 |
| - _Tp __v; |
520 |
| - if (__is >> __v >> __ch) |
521 |
| - { |
522 |
| - if (_Traits::eq(__ch, __rparen)) |
523 |
| - { |
524 |
| - __x = complex<_Tp>(__u, __v); |
525 |
| - __fail = false; |
526 |
| - } |
527 |
| - else |
528 |
| - __is.putback(__ch); |
529 |
| - } |
530 |
| - } |
531 |
| - else |
532 |
| - __is.putback(__ch); |
533 |
| - } |
534 |
| - } |
535 |
| - else |
536 |
| - { |
537 |
| - __is.putback(__ch); |
538 |
| - _Tp __u; |
539 |
| - if (__is >> __u) |
540 |
| - { |
541 |
| - __x = __u; |
542 |
| - __fail = false; |
543 |
| - } |
544 |
| - } |
545 |
| - } |
546 |
| - if (__fail) |
547 |
| - __is.setstate(ios_base::failbit); |
548 |
| - return __is; |
549 |
| - } |
550 |
| - |
551 |
| - /// Insertion operator for complex values. |
552 |
| - template<typename _Tp, typename _CharT, class _Traits> |
553 |
| - basic_ostream<_CharT, _Traits>& |
554 |
| - operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x) |
555 |
| - { |
556 |
| - basic_ostringstream<_CharT, _Traits> __s; |
557 |
| - __s.flags(__os.flags()); |
558 |
| - __s.imbue(__os.getloc()); |
559 |
| - __s.precision(__os.precision()); |
560 |
| - __s << '(' << __x.real() << ',' << __x.imag() << ')'; |
561 |
| - return __os << __s.str(); |
562 |
| - } |
563 |
| - |
564 | 496 | // Values
|
565 | 497 | #if __cplusplus >= 201103L
|
566 | 498 | template<typename _Tp>
|
@@ -1527,27 +1459,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
1527 | 1459 | complex<double>::complex(const complex<long double>& __z)
|
1528 | 1460 | : _M_value(__z.__rep()) { }
|
1529 | 1461 |
|
1530 |
| - // Inhibit implicit instantiations for required instantiations, |
1531 |
| - // which are defined via explicit instantiations elsewhere. |
1532 |
| - // NB: This syntax is a GNU extension. |
1533 |
| -#if _GLIBCXX_EXTERN_TEMPLATE |
1534 |
| - extern template istream& operator>>(istream&, complex<float>&); |
1535 |
| - extern template ostream& operator<<(ostream&, const complex<float>&); |
1536 |
| - extern template istream& operator>>(istream&, complex<double>&); |
1537 |
| - extern template ostream& operator<<(ostream&, const complex<double>&); |
1538 |
| - extern template istream& operator>>(istream&, complex<long double>&); |
1539 |
| - extern template ostream& operator<<(ostream&, const complex<long double>&); |
1540 |
| - |
1541 |
| -#ifdef _GLIBCXX_USE_WCHAR_T |
1542 |
| - extern template wistream& operator>>(wistream&, complex<float>&); |
1543 |
| - extern template wostream& operator<<(wostream&, const complex<float>&); |
1544 |
| - extern template wistream& operator>>(wistream&, complex<double>&); |
1545 |
| - extern template wostream& operator<<(wostream&, const complex<double>&); |
1546 |
| - extern template wistream& operator>>(wistream&, complex<long double>&); |
1547 |
| - extern template wostream& operator<<(wostream&, const complex<long double>&); |
1548 |
| -#endif |
1549 |
| -#endif |
1550 |
| - |
1551 | 1462 | // @} group complex_numbers
|
1552 | 1463 |
|
1553 | 1464 | _GLIBCXX_END_NAMESPACE_VERSION
|
|
0 commit comments