aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/include/istream
diff options
context:
space:
mode:
authorMikhail Borisov <borisov.mikhail@gmail.com>2022-02-10 16:45:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:39 +0300
commita6a92afe03e02795227d2641b49819b687f088f8 (patch)
treef6984a1d27d5a7ec88a6fdd6e20cd5b7693b6ece /contrib/libs/cxxsupp/libcxx/include/istream
parentc6dc8b8bd530985bc4cce0137e9a5de32f1087cb (diff)
downloadydb-a6a92afe03e02795227d2641b49819b687f088f8.tar.gz
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/istream')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/istream364
1 files changed, 182 insertions, 182 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/istream b/contrib/libs/cxxsupp/libcxx/include/istream
index 6fb296f820..bf8c066dc6 100644
--- a/contrib/libs/cxxsupp/libcxx/include/istream
+++ b/contrib/libs/cxxsupp/libcxx/include/istream
@@ -359,16 +359,16 @@ __input_arithmetic(basic_istream<_CharT, _Traits>& __is, _Tp& __n) {
if (__s)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
- try
- {
+ try
+ {
#endif // _LIBCPP_NO_EXCEPTIONS
typedef istreambuf_iterator<_CharT, _Traits> _Ip;
typedef num_get<_CharT, _Ip> _Fp;
use_facet<_Fp>(__is.getloc()).get(_Ip(__is), _Ip(), __is, __state, __n);
#ifndef _LIBCPP_NO_EXCEPTIONS
- }
- catch (...)
- {
+ }
+ catch (...)
+ {
__state |= ios_base::badbit;
__is.__setstate_nothrow(__state);
if (__is.exceptions() & ios_base::badbit)
@@ -468,8 +468,8 @@ __input_arithmetic_with_numeric_limits(basic_istream<_CharT, _Traits>& __is, _Tp
if (__s)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
- try
- {
+ try
+ {
#endif // _LIBCPP_NO_EXCEPTIONS
typedef istreambuf_iterator<_CharT, _Traits> _Ip;
typedef num_get<_CharT, _Ip> _Fp;
@@ -488,18 +488,18 @@ __input_arithmetic_with_numeric_limits(basic_istream<_CharT, _Traits>& __is, _Tp
else
{
__n = static_cast<_Tp>(__temp);
- }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+ }
+#ifndef _LIBCPP_NO_EXCEPTIONS
}
- catch (...)
- {
+ catch (...)
+ {
__state |= ios_base::badbit;
__is.__setstate_nothrow(__state);
if (__is.exceptions() & ios_base::badbit)
{
throw;
}
- }
+ }
#endif // _LIBCPP_NO_EXCEPTIONS
__is.setstate(__state);
}
@@ -526,9 +526,9 @@ basic_istream<_CharT, _Traits>&
__input_c_string(basic_istream<_CharT, _Traits>& __is, _CharT* __p, size_t __n)
{
ios_base::iostate __state = ios_base::goodbit;
- typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
- if (__sen)
- {
+ typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
+ if (__sen)
+ {
#ifndef _LIBCPP_NO_EXCEPTIONS
try
{
@@ -554,9 +554,9 @@ __input_c_string(basic_istream<_CharT, _Traits>& __is, _CharT* __p, size_t __n)
if (__s == __p)
__state |= ios_base::failbit;
#ifndef _LIBCPP_NO_EXCEPTIONS
- }
- catch (...)
- {
+ }
+ catch (...)
+ {
__state |= ios_base::badbit;
__is.__setstate_nothrow(__state);
if (__is.exceptions() & ios_base::badbit)
@@ -635,9 +635,9 @@ basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, _CharT& __c)
{
ios_base::iostate __state = ios_base::goodbit;
- typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
- if (__sen)
- {
+ typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
+ if (__sen)
+ {
#ifndef _LIBCPP_NO_EXCEPTIONS
try
{
@@ -648,9 +648,9 @@ operator>>(basic_istream<_CharT, _Traits>& __is, _CharT& __c)
else
__c = _Traits::to_char_type(__i);
#ifndef _LIBCPP_NO_EXCEPTIONS
- }
- catch (...)
- {
+ }
+ catch (...)
+ {
__state |= ios_base::badbit;
__is.__setstate_nothrow(__state);
if (__is.exceptions() & ios_base::badbit)
@@ -686,38 +686,38 @@ basic_istream<_CharT, _Traits>::operator>>(basic_streambuf<char_type, traits_typ
{
ios_base::iostate __state = ios_base::goodbit;
__gc_ = 0;
- sentry __s(*this, true);
- if (__s)
- {
- if (__sb)
+ sentry __s(*this, true);
+ if (__s)
+ {
+ if (__sb)
{
-#ifndef _LIBCPP_NO_EXCEPTIONS
- try
+#ifndef _LIBCPP_NO_EXCEPTIONS
+ try
{
-#endif // _LIBCPP_NO_EXCEPTIONS
- while (true)
+#endif // _LIBCPP_NO_EXCEPTIONS
+ while (true)
{
- typename traits_type::int_type __i = this->rdbuf()->sgetc();
- if (traits_type::eq_int_type(__i, _Traits::eof()))
+ typename traits_type::int_type __i = this->rdbuf()->sgetc();
+ if (traits_type::eq_int_type(__i, _Traits::eof()))
{
__state |= ios_base::eofbit;
- break;
+ break;
}
- if (traits_type::eq_int_type(
- __sb->sputc(traits_type::to_char_type(__i)),
- traits_type::eof()))
- break;
- ++__gc_;
- this->rdbuf()->sbumpc();
- }
- if (__gc_ == 0)
+ if (traits_type::eq_int_type(
+ __sb->sputc(traits_type::to_char_type(__i)),
+ traits_type::eof()))
+ break;
+ ++__gc_;
+ this->rdbuf()->sbumpc();
+ }
+ if (__gc_ == 0)
__state |= ios_base::failbit;
#ifndef _LIBCPP_NO_EXCEPTIONS
- }
- catch (...)
- {
+ }
+ catch (...)
+ {
__state |= ios_base::badbit;
- if (__gc_ == 0)
+ if (__gc_ == 0)
__state |= ios_base::failbit;
this->__setstate_nothrow(__state);
@@ -725,11 +725,11 @@ basic_istream<_CharT, _Traits>::operator>>(basic_streambuf<char_type, traits_typ
{
throw;
}
- }
+ }
#endif // _LIBCPP_NO_EXCEPTIONS
- }
- else
- {
+ }
+ else
+ {
__state |= ios_base::failbit;
}
this->setstate(__state);
@@ -744,9 +744,9 @@ basic_istream<_CharT, _Traits>::get()
ios_base::iostate __state = ios_base::goodbit;
__gc_ = 0;
int_type __r = traits_type::eof();
- sentry __s(*this, true);
- if (__s)
- {
+ sentry __s(*this, true);
+ if (__s)
+ {
#ifndef _LIBCPP_NO_EXCEPTIONS
try
{
@@ -757,9 +757,9 @@ basic_istream<_CharT, _Traits>::get()
else
__gc_ = 1;
#ifndef _LIBCPP_NO_EXCEPTIONS
- }
- catch (...)
- {
+ }
+ catch (...)
+ {
this->__setstate_nothrow(this->rdstate() | ios_base::badbit);
if (this->exceptions() & ios_base::badbit)
{
@@ -778,10 +778,10 @@ basic_istream<_CharT, _Traits>::get(char_type* __s, streamsize __n, char_type __
{
ios_base::iostate __state = ios_base::goodbit;
__gc_ = 0;
- sentry __sen(*this, true);
- if (__sen)
- {
- if (__n > 0)
+ sentry __sen(*this, true);
+ if (__sen)
+ {
+ if (__n > 0)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
try
@@ -805,22 +805,22 @@ basic_istream<_CharT, _Traits>::get(char_type* __s, streamsize __n, char_type __
if (__gc_ == 0)
__state |= ios_base::failbit;
#ifndef _LIBCPP_NO_EXCEPTIONS
- }
+ }
catch (...)
{
__state |= ios_base::badbit;
this->__setstate_nothrow(__state);
if (this->exceptions() & ios_base::badbit)
{
- if (__n > 0)
- *__s = char_type();
+ if (__n > 0)
+ *__s = char_type();
throw;
- }
+ }
}
#endif
}
else
- {
+ {
__state |= ios_base::failbit;
}
@@ -840,41 +840,41 @@ basic_istream<_CharT, _Traits>::get(basic_streambuf<char_type, traits_type>& __s
{
ios_base::iostate __state = ios_base::goodbit;
__gc_ = 0;
- sentry __sen(*this, true);
- if (__sen)
- {
-#ifndef _LIBCPP_NO_EXCEPTIONS
- try
+ sentry __sen(*this, true);
+ if (__sen)
+ {
+#ifndef _LIBCPP_NO_EXCEPTIONS
+ try
{
#endif // _LIBCPP_NO_EXCEPTIONS
- while (true)
+ while (true)
{
- typename traits_type::int_type __i = this->rdbuf()->sgetc();
- if (traits_type::eq_int_type(__i, traits_type::eof()))
+ typename traits_type::int_type __i = this->rdbuf()->sgetc();
+ if (traits_type::eq_int_type(__i, traits_type::eof()))
{
__state |= ios_base::eofbit;
- break;
+ break;
}
- char_type __ch = traits_type::to_char_type(__i);
- if (traits_type::eq(__ch, __dlm))
- break;
- if (traits_type::eq_int_type(__sb.sputc(__ch), traits_type::eof()))
- break;
- ++__gc_;
- this->rdbuf()->sbumpc();
- }
+ char_type __ch = traits_type::to_char_type(__i);
+ if (traits_type::eq(__ch, __dlm))
+ break;
+ if (traits_type::eq_int_type(__sb.sputc(__ch), traits_type::eof()))
+ break;
+ ++__gc_;
+ this->rdbuf()->sbumpc();
+ }
#ifndef _LIBCPP_NO_EXCEPTIONS
- }
- catch (...)
- {
+ }
+ catch (...)
+ {
__state |= ios_base::badbit;
// according to the spec, exceptions here are caught but not rethrown
- }
+ }
#endif // _LIBCPP_NO_EXCEPTIONS
- if (__gc_ == 0)
+ if (__gc_ == 0)
__state |= ios_base::failbit;
this->setstate(__state);
- }
+ }
return *this;
}
@@ -888,8 +888,8 @@ basic_istream<_CharT, _Traits>::getline(char_type* __s, streamsize __n, char_typ
if (__sen)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
- try
- {
+ try
+ {
#endif // _LIBCPP_NO_EXCEPTIONS
while (true)
{
@@ -916,20 +916,20 @@ basic_istream<_CharT, _Traits>::getline(char_type* __s, streamsize __n, char_typ
++__gc_;
}
#ifndef _LIBCPP_NO_EXCEPTIONS
- }
- catch (...)
- {
+ }
+ catch (...)
+ {
__state |= ios_base::badbit;
this->__setstate_nothrow(__state);
if (this->exceptions() & ios_base::badbit)
{
- if (__n > 0)
- *__s = char_type();
+ if (__n > 0)
+ *__s = char_type();
if (__gc_ == 0)
__state |= ios_base::failbit;
throw;
}
- }
+ }
#endif // _LIBCPP_NO_EXCEPTIONS
}
if (__n > 0)
@@ -950,8 +950,8 @@ basic_istream<_CharT, _Traits>::ignore(streamsize __n, int_type __dlm)
if (__sen)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
- try
- {
+ try
+ {
#endif // _LIBCPP_NO_EXCEPTIONS
if (__n == numeric_limits<streamsize>::max())
{
@@ -984,16 +984,16 @@ basic_istream<_CharT, _Traits>::ignore(streamsize __n, int_type __dlm)
}
}
#ifndef _LIBCPP_NO_EXCEPTIONS
- }
- catch (...)
- {
+ }
+ catch (...)
+ {
__state |= ios_base::badbit;
this->__setstate_nothrow(__state);
if (this->exceptions() & ios_base::badbit)
{
throw;
}
- }
+ }
#endif // _LIBCPP_NO_EXCEPTIONS
this->setstate(__state);
}
@@ -1011,23 +1011,23 @@ basic_istream<_CharT, _Traits>::peek()
if (__sen)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
- try
- {
+ try
+ {
#endif // _LIBCPP_NO_EXCEPTIONS
__r = this->rdbuf()->sgetc();
if (traits_type::eq_int_type(__r, traits_type::eof()))
__state |= ios_base::eofbit;
#ifndef _LIBCPP_NO_EXCEPTIONS
- }
- catch (...)
- {
+ }
+ catch (...)
+ {
__state |= ios_base::badbit;
this->__setstate_nothrow(__state);
if (this->exceptions() & ios_base::badbit)
{
throw;
}
- }
+ }
#endif // _LIBCPP_NO_EXCEPTIONS
this->setstate(__state);
}
@@ -1044,23 +1044,23 @@ basic_istream<_CharT, _Traits>::read(char_type* __s, streamsize __n)
if (__sen)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
- try
- {
+ try
+ {
#endif // _LIBCPP_NO_EXCEPTIONS
__gc_ = this->rdbuf()->sgetn(__s, __n);
if (__gc_ != __n)
__state |= ios_base::failbit | ios_base::eofbit;
#ifndef _LIBCPP_NO_EXCEPTIONS
- }
- catch (...)
- {
+ }
+ catch (...)
+ {
__state |= ios_base::badbit;
this->__setstate_nothrow(__state);
if (this->exceptions() & ios_base::badbit)
{
throw;
}
- }
+ }
#endif // _LIBCPP_NO_EXCEPTIONS
}
else
@@ -1081,8 +1081,8 @@ basic_istream<_CharT, _Traits>::readsome(char_type* __s, streamsize __n)
if (__sen)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
- try
- {
+ try
+ {
#endif // _LIBCPP_NO_EXCEPTIONS
streamsize __c = this->rdbuf()->in_avail();
switch (__c)
@@ -1100,16 +1100,16 @@ basic_istream<_CharT, _Traits>::readsome(char_type* __s, streamsize __n)
break;
}
#ifndef _LIBCPP_NO_EXCEPTIONS
- }
- catch (...)
- {
+ }
+ catch (...)
+ {
__state |= ios_base::badbit;
this->__setstate_nothrow(__state);
if (this->exceptions() & ios_base::badbit)
{
throw;
}
- }
+ }
#endif // _LIBCPP_NO_EXCEPTIONS
}
else
@@ -1131,22 +1131,22 @@ basic_istream<_CharT, _Traits>::putback(char_type __c)
if (__sen)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
- try
- {
+ try
+ {
#endif // _LIBCPP_NO_EXCEPTIONS
if (this->rdbuf() == nullptr || this->rdbuf()->sputbackc(__c) == traits_type::eof())
__state |= ios_base::badbit;
#ifndef _LIBCPP_NO_EXCEPTIONS
- }
- catch (...)
- {
+ }
+ catch (...)
+ {
__state |= ios_base::badbit;
this->__setstate_nothrow(__state);
if (this->exceptions() & ios_base::badbit)
{
throw;
}
- }
+ }
#endif // _LIBCPP_NO_EXCEPTIONS
}
else
@@ -1168,22 +1168,22 @@ basic_istream<_CharT, _Traits>::unget()
if (__sen)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
- try
- {
+ try
+ {
#endif // _LIBCPP_NO_EXCEPTIONS
if (this->rdbuf() == nullptr || this->rdbuf()->sungetc() == traits_type::eof())
__state |= ios_base::badbit;
#ifndef _LIBCPP_NO_EXCEPTIONS
- }
- catch (...)
- {
+ }
+ catch (...)
+ {
__state |= ios_base::badbit;
this->__setstate_nothrow(__state);
if (this->exceptions() & ios_base::badbit)
{
throw;
}
- }
+ }
#endif // _LIBCPP_NO_EXCEPTIONS
}
else
@@ -1204,8 +1204,8 @@ basic_istream<_CharT, _Traits>::sync()
if (__sen)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
- try
- {
+ try
+ {
#endif // _LIBCPP_NO_EXCEPTIONS
if (this->rdbuf() == nullptr)
return -1;
@@ -1215,16 +1215,16 @@ basic_istream<_CharT, _Traits>::sync()
return -1;
}
#ifndef _LIBCPP_NO_EXCEPTIONS
- }
- catch (...)
- {
+ }
+ catch (...)
+ {
__state |= ios_base::badbit;
this->__setstate_nothrow(__state);
if (this->exceptions() & ios_base::badbit)
{
throw;
}
- }
+ }
#endif // _LIBCPP_NO_EXCEPTIONS
this->setstate(__state);
}
@@ -1241,21 +1241,21 @@ basic_istream<_CharT, _Traits>::tellg()
if (__sen)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
- try
- {
+ try
+ {
#endif // _LIBCPP_NO_EXCEPTIONS
- __r = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::in);
+ __r = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::in);
#ifndef _LIBCPP_NO_EXCEPTIONS
- }
- catch (...)
- {
+ }
+ catch (...)
+ {
__state |= ios_base::badbit;
this->__setstate_nothrow(__state);
if (this->exceptions() & ios_base::badbit)
{
throw;
}
- }
+ }
#endif // _LIBCPP_NO_EXCEPTIONS
this->setstate(__state);
}
@@ -1272,22 +1272,22 @@ basic_istream<_CharT, _Traits>::seekg(pos_type __pos)
if (__sen)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
- try
- {
+ try
+ {
#endif // _LIBCPP_NO_EXCEPTIONS
if (this->rdbuf()->pubseekpos(__pos, ios_base::in) == pos_type(-1))
__state |= ios_base::failbit;
#ifndef _LIBCPP_NO_EXCEPTIONS
- }
- catch (...)
- {
+ }
+ catch (...)
+ {
__state |= ios_base::badbit;
this->__setstate_nothrow(__state);
if (this->exceptions() & ios_base::badbit)
{
throw;
}
- }
+ }
#endif // _LIBCPP_NO_EXCEPTIONS
this->setstate(__state);
}
@@ -1304,22 +1304,22 @@ basic_istream<_CharT, _Traits>::seekg(off_type __off, ios_base::seekdir __dir)
if (__sen)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
- try
- {
+ try
+ {
#endif // _LIBCPP_NO_EXCEPTIONS
if (this->rdbuf()->pubseekoff(__off, __dir, ios_base::in) == pos_type(-1))
__state |= ios_base::failbit;
#ifndef _LIBCPP_NO_EXCEPTIONS
- }
- catch (...)
- {
+ }
+ catch (...)
+ {
__state |= ios_base::badbit;
this->__setstate_nothrow(__state);
if (this->exceptions() & ios_base::badbit)
{
throw;
}
- }
+ }
#endif // _LIBCPP_NO_EXCEPTIONS
this->setstate(__state);
}
@@ -1335,8 +1335,8 @@ ws(basic_istream<_CharT, _Traits>& __is)
if (__sen)
{
#ifndef _LIBCPP_NO_EXCEPTIONS
- try
- {
+ try
+ {
#endif // _LIBCPP_NO_EXCEPTIONS
const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__is.getloc());
while (true)
@@ -1352,16 +1352,16 @@ ws(basic_istream<_CharT, _Traits>& __is)
__is.rdbuf()->sbumpc();
}
#ifndef _LIBCPP_NO_EXCEPTIONS
- }
- catch (...)
- {
+ }
+ catch (...)
+ {
__state |= ios_base::badbit;
__is.__setstate_nothrow(__state);
if (__is.exceptions() & ios_base::badbit)
{
throw;
}
- }
+ }
#endif // _LIBCPP_NO_EXCEPTIONS
__is.setstate(__state);
}
@@ -1445,9 +1445,9 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
basic_string<_CharT, _Traits, _Allocator>& __str)
{
ios_base::iostate __state = ios_base::goodbit;
- typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
- if (__sen)
- {
+ typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
+ if (__sen)
+ {
#ifndef _LIBCPP_NO_EXCEPTIONS
try
{
@@ -1479,9 +1479,9 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
if (__c == 0)
__state |= ios_base::failbit;
#ifndef _LIBCPP_NO_EXCEPTIONS
- }
- catch (...)
- {
+ }
+ catch (...)
+ {
__state |= ios_base::badbit;
__is.__setstate_nothrow(__state);
if (__is.exceptions() & ios_base::badbit)
@@ -1501,9 +1501,9 @@ getline(basic_istream<_CharT, _Traits>& __is,
basic_string<_CharT, _Traits, _Allocator>& __str, _CharT __dlm)
{
ios_base::iostate __state = ios_base::goodbit;
- typename basic_istream<_CharT, _Traits>::sentry __sen(__is, true);
- if (__sen)
- {
+ typename basic_istream<_CharT, _Traits>::sentry __sen(__is, true);
+ if (__sen)
+ {
#ifndef _LIBCPP_NO_EXCEPTIONS
try
{
@@ -1532,9 +1532,9 @@ getline(basic_istream<_CharT, _Traits>& __is,
if (__extr == 0)
__state |= ios_base::failbit;
#ifndef _LIBCPP_NO_EXCEPTIONS
- }
- catch (...)
- {
+ }
+ catch (...)
+ {
__state |= ios_base::badbit;
__is.__setstate_nothrow(__state);
if (__is.exceptions() & ios_base::badbit)
@@ -1580,9 +1580,9 @@ basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x)
{
ios_base::iostate __state = ios_base::goodbit;
- typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
- if (__sen)
- {
+ typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
+ if (__sen)
+ {
#ifndef _LIBCPP_NO_EXCEPTIONS
try
{
@@ -1611,9 +1611,9 @@ operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x)
if (_Size > 0 && __c == 0)
__state |= ios_base::failbit;
#ifndef _LIBCPP_NO_EXCEPTIONS
- }
- catch (...)
- {
+ }
+ catch (...)
+ {
__state |= ios_base::badbit;
__is.__setstate_nothrow(__state);
if (__is.exceptions() & ios_base::badbit)