Go to the source code of this file.
|
template<class _Tp , class _CharT , class _Traits > |
basic_ostream< _CharT, _Traits > &_STLP_CALL | operator<< (basic_ostream< _CharT, _Traits > &__os, const complex< _Tp > &__z) |
|
template<class _Tp , class _CharT , class _Traits > |
basic_istream< _CharT, _Traits > &_STLP_CALL | operator>> (basic_istream< _CharT, _Traits > &__is, complex< _Tp > &__z) |
|
◆ _STLP_COMPLEX_C
◆ operator<<()
Definition at line 91 of file _complex.c.
92 {
97 __tmp <<
'(' << __z.
real() <<
',' << __z.
imag() <<
')';
98 return __os << __tmp.
str();
99}
locale imbue(const locale &)
streamsize precision() const
◆ operator>>()
Definition at line 107 of file _complex.c.
107 {
108 _Tp __re = 0;
109 _Tp __im = 0;
110
112
113 const char __punct[4] = "(,)";
114 _CharT __wpunct[3];
115 __c_type.widen(__punct, __punct + 3, __wpunct);
116
118
120 if (_Traits::eq(
__c, __wpunct[0])) {
122 if (_Traits::eq(
__c, __wpunct[1]))
124 if (!_Traits::eq(
__c, __wpunct[2]))
126 }
127 else {
129 __is >> __re;
130 }
131
132 if (__is)
134 return __is;
135}
const ctype< char_type > * _M_ctype_facet() const
void setstate(iostate __state)
_Self & putback(char_type __c)