003 File Manager
Current Path:
/usr/include/c++/v1
usr
/
include
/
c++
/
v1
/
📁
..
📄
__bit_reference
(51.94 KB)
📄
__bsd_locale_defaults.h
(2.06 KB)
📄
__bsd_locale_fallbacks.h
(3.94 KB)
📄
__config
(51.99 KB)
📄
__debug
(7.77 KB)
📄
__errc
(9.13 KB)
📄
__functional_03
(43.5 KB)
📄
__functional_base
(17.4 KB)
📄
__functional_base_03
(6.38 KB)
📄
__hash_table
(101.98 KB)
📄
__libcpp_version
(6 B)
📄
__locale
(48.08 KB)
📄
__mutex_base
(16.04 KB)
📄
__node_handle
(5.93 KB)
📄
__nullptr
(1.69 KB)
📄
__split_buffer
(21.9 KB)
📄
__sso_allocator
(2.49 KB)
📄
__std_stream
(10.32 KB)
📄
__string
(46.11 KB)
📄
__threading_support
(20.64 KB)
📄
__tree
(102.38 KB)
📄
__tuple
(20.19 KB)
📄
__undef_macros
(1.02 KB)
📄
algorithm
(199 KB)
📄
any
(18.58 KB)
📄
array
(20.44 KB)
📄
atomic
(96.81 KB)
📄
barrier
(9.98 KB)
📄
bit
(14.13 KB)
📄
bitset
(33 KB)
📄
cassert
(559 B)
📄
ccomplex
(640 B)
📄
cctype
(1.72 KB)
📄
cerrno
(669 B)
📄
cfenv
(1.56 KB)
📄
cfloat
(1.39 KB)
📄
charconv
(17.95 KB)
📄
chrono
(113.59 KB)
📄
cinttypes
(3.44 KB)
📄
ciso646
(595 B)
📄
climits
(907 B)
📄
clocale
(998 B)
📄
cmath
(16.71 KB)
📄
codecvt
(20.12 KB)
📄
compare
(30.14 KB)
📄
complex
(45.51 KB)
📄
complex.h
(739 B)
📄
concepts
(4.63 KB)
📄
condition_variable
(7.43 KB)
📄
csetjmp
(813 B)
📄
csignal
(964 B)
📄
cstdarg
(903 B)
📄
cstdbool
(721 B)
📄
cstddef
(5.29 KB)
📄
cstdint
(2.73 KB)
📄
cstdio
(4.31 KB)
📄
cstdlib
(4.69 KB)
📄
cstring
(2.49 KB)
📄
ctgmath
(650 B)
📄
ctime
(1.67 KB)
📄
ctype.h
(1.12 KB)
📄
cwchar
(6.14 KB)
📄
cwctype
(1.65 KB)
📄
cxxabi.h
(8.6 KB)
📄
deque
(106.34 KB)
📄
errno.h
(6.19 KB)
📄
exception
(9.25 KB)
📄
execution
(595 B)
📁
experimental
📁
ext
📄
fenv.h
(1.82 KB)
📄
filesystem
(80.17 KB)
📄
float.h
(1.58 KB)
📄
forward_list
(61.11 KB)
📄
fstream
(53.05 KB)
📄
functional
(99.54 KB)
📄
future
(70.91 KB)
📄
initializer_list
(2.78 KB)
📄
inttypes.h
(3.8 KB)
📄
iomanip
(17.85 KB)
📄
ios
(24.99 KB)
📄
iosfwd
(8.27 KB)
📄
iostream
(1.36 KB)
📄
istream
(46.73 KB)
📄
iterator
(70.11 KB)
📄
latch
(2.35 KB)
📄
limits
(39.71 KB)
📄
limits.h
(1.44 KB)
📄
list
(78.48 KB)
📄
locale
(150.64 KB)
📄
locale.h
(776 B)
📄
map
(82.59 KB)
📄
math.h
(48.03 KB)
📄
memory
(160.89 KB)
📄
mutex
(17.25 KB)
📄
new
(13.79 KB)
📄
numbers
(6.74 KB)
📄
numeric
(20.08 KB)
📄
optional
(41.59 KB)
📄
ostream
(32.02 KB)
📄
queue
(27.47 KB)
📄
random
(221.29 KB)
📄
ratio
(16.04 KB)
📄
regex
(219.62 KB)
📄
scoped_allocator
(25.14 KB)
📄
semaphore
(6.52 KB)
📄
set
(55.98 KB)
📄
setjmp.h
(802 B)
📄
shared_mutex
(14.75 KB)
📄
span
(22.41 KB)
📄
sstream
(32.59 KB)
📄
stack
(9.86 KB)
📄
stdbool.h
(815 B)
📄
stddef.h
(1.08 KB)
📄
stdexcept
(7.66 KB)
📄
stdint.h
(2.27 KB)
📄
stdio.h
(3.44 KB)
📄
stdlib.h
(5.1 KB)
📄
streambuf
(14.18 KB)
📄
string
(163.38 KB)
📄
string.h
(4.58 KB)
📄
string_view
(33.74 KB)
📄
strstream
(10.88 KB)
📄
system_error
(13.88 KB)
📄
tgmath.h
(732 B)
📄
thread
(11.13 KB)
📁
tr1
📄
tuple
(55.25 KB)
📄
type_traits
(147.84 KB)
📄
typeindex
(2.76 KB)
📄
typeinfo
(11.27 KB)
📄
unordered_map
(97.16 KB)
📄
unordered_set
(67.79 KB)
📄
unwind-arm.h
(7.36 KB)
📄
unwind-itanium.h
(6.34 KB)
📄
unwind.h
(1.35 KB)
📄
utility
(48.28 KB)
📄
valarray
(131.97 KB)
📄
variant
(60.89 KB)
📄
vector
(109.43 KB)
📄
version
(14.98 KB)
📄
wchar.h
(8.24 KB)
📄
wctype.h
(1.52 KB)
Editing: __std_stream
// -*- C++ -*- //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef _LIBCPP___STD_STREAM #define _LIBCPP___STD_STREAM #include <__config> #include <ostream> #include <istream> #include <__locale> #include <cstdio> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif _LIBCPP_PUSH_MACROS #include <__undef_macros> _LIBCPP_BEGIN_NAMESPACE_STD static const int __limit = 8; // __stdinbuf template <class _CharT> class _LIBCPP_HIDDEN __stdinbuf : public basic_streambuf<_CharT, char_traits<_CharT> > { public: typedef _CharT char_type; typedef char_traits<char_type> traits_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; typedef typename traits_type::state_type state_type; __stdinbuf(FILE* __fp, state_type* __st); protected: virtual int_type underflow(); virtual int_type uflow(); virtual int_type pbackfail(int_type __c = traits_type::eof()); virtual void imbue(const locale& __loc); private: FILE* __file_; const codecvt<char_type, char, state_type>* __cv_; state_type* __st_; int __encoding_; int_type __last_consumed_; bool __last_consumed_is_next_; bool __always_noconv_; __stdinbuf(const __stdinbuf&); __stdinbuf& operator=(const __stdinbuf&); int_type __getchar(bool __consume); }; template <class _CharT> __stdinbuf<_CharT>::__stdinbuf(FILE* __fp, state_type* __st) : __file_(__fp), __st_(__st), __last_consumed_(traits_type::eof()), __last_consumed_is_next_(false) { imbue(this->getloc()); } template <class _CharT> void __stdinbuf<_CharT>::imbue(const locale& __loc) { __cv_ = &use_facet<codecvt<char_type, char, state_type> >(__loc); __encoding_ = __cv_->encoding(); __always_noconv_ = __cv_->always_noconv(); if (__encoding_ > __limit) __throw_runtime_error("unsupported locale for standard input"); } template <class _CharT> typename __stdinbuf<_CharT>::int_type __stdinbuf<_CharT>::underflow() { return __getchar(false); } template <class _CharT> typename __stdinbuf<_CharT>::int_type __stdinbuf<_CharT>::uflow() { return __getchar(true); } template <class _CharT> typename __stdinbuf<_CharT>::int_type __stdinbuf<_CharT>::__getchar(bool __consume) { if (__last_consumed_is_next_) { int_type __result = __last_consumed_; if (__consume) { __last_consumed_ = traits_type::eof(); __last_consumed_is_next_ = false; } return __result; } char __extbuf[__limit]; int __nread = _VSTD::max(1, __encoding_); for (int __i = 0; __i < __nread; ++__i) { int __c = getc(__file_); if (__c == EOF) return traits_type::eof(); __extbuf[__i] = static_cast<char>(__c); } char_type __1buf; if (__always_noconv_) __1buf = static_cast<char_type>(__extbuf[0]); else { const char* __enxt; char_type* __inxt; codecvt_base::result __r; do { state_type __sv_st = *__st_; __r = __cv_->in(*__st_, __extbuf, __extbuf + __nread, __enxt, &__1buf, &__1buf + 1, __inxt); switch (__r) { case _VSTD::codecvt_base::ok: break; case codecvt_base::partial: *__st_ = __sv_st; if (__nread == sizeof(__extbuf)) return traits_type::eof(); { int __c = getc(__file_); if (__c == EOF) return traits_type::eof(); __extbuf[__nread] = static_cast<char>(__c); } ++__nread; break; case codecvt_base::error: return traits_type::eof(); case _VSTD::codecvt_base::noconv: __1buf = static_cast<char_type>(__extbuf[0]); break; } } while (__r == _VSTD::codecvt_base::partial); } if (!__consume) { for (int __i = __nread; __i > 0;) { if (ungetc(traits_type::to_int_type(__extbuf[--__i]), __file_) == EOF) return traits_type::eof(); } } else __last_consumed_ = traits_type::to_int_type(__1buf); return traits_type::to_int_type(__1buf); } template <class _CharT> typename __stdinbuf<_CharT>::int_type __stdinbuf<_CharT>::pbackfail(int_type __c) { if (traits_type::eq_int_type(__c, traits_type::eof())) { if (!__last_consumed_is_next_) { __c = __last_consumed_; __last_consumed_is_next_ = !traits_type::eq_int_type(__last_consumed_, traits_type::eof()); } return __c; } if (__last_consumed_is_next_) { char __extbuf[__limit]; char* __enxt; const char_type __ci = traits_type::to_char_type(__last_consumed_); const char_type* __inxt; switch (__cv_->out(*__st_, &__ci, &__ci + 1, __inxt, __extbuf, __extbuf + sizeof(__extbuf), __enxt)) { case _VSTD::codecvt_base::ok: break; case _VSTD::codecvt_base::noconv: __extbuf[0] = static_cast<char>(__last_consumed_); __enxt = __extbuf + 1; break; case codecvt_base::partial: case codecvt_base::error: return traits_type::eof(); } while (__enxt > __extbuf) if (ungetc(*--__enxt, __file_) == EOF) return traits_type::eof(); } __last_consumed_ = __c; __last_consumed_is_next_ = true; return __c; } // __stdoutbuf template <class _CharT> class _LIBCPP_HIDDEN __stdoutbuf : public basic_streambuf<_CharT, char_traits<_CharT> > { public: typedef _CharT char_type; typedef char_traits<char_type> traits_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; typedef typename traits_type::state_type state_type; __stdoutbuf(FILE* __fp, state_type* __st); protected: virtual int_type overflow (int_type __c = traits_type::eof()); virtual streamsize xsputn(const char_type* __s, streamsize __n); virtual int sync(); virtual void imbue(const locale& __loc); private: FILE* __file_; const codecvt<char_type, char, state_type>* __cv_; state_type* __st_; bool __always_noconv_; __stdoutbuf(const __stdoutbuf&); __stdoutbuf& operator=(const __stdoutbuf&); }; template <class _CharT> __stdoutbuf<_CharT>::__stdoutbuf(FILE* __fp, state_type* __st) : __file_(__fp), __cv_(&use_facet<codecvt<char_type, char, state_type> >(this->getloc())), __st_(__st), __always_noconv_(__cv_->always_noconv()) { } template <class _CharT> typename __stdoutbuf<_CharT>::int_type __stdoutbuf<_CharT>::overflow(int_type __c) { char __extbuf[__limit]; char_type __1buf; if (!traits_type::eq_int_type(__c, traits_type::eof())) { __1buf = traits_type::to_char_type(__c); if (__always_noconv_) { if (fwrite(&__1buf, sizeof(char_type), 1, __file_) != 1) return traits_type::eof(); } else { char* __extbe = __extbuf; codecvt_base::result __r; char_type* pbase = &__1buf; char_type* pptr = pbase + 1; do { const char_type* __e; __r = __cv_->out(*__st_, pbase, pptr, __e, __extbuf, __extbuf + sizeof(__extbuf), __extbe); if (__e == pbase) return traits_type::eof(); if (__r == codecvt_base::noconv) { if (fwrite(pbase, 1, 1, __file_) != 1) return traits_type::eof(); } else if (__r == codecvt_base::ok || __r == codecvt_base::partial) { size_t __nmemb = static_cast<size_t>(__extbe - __extbuf); if (fwrite(__extbuf, 1, __nmemb, __file_) != __nmemb) return traits_type::eof(); if (__r == codecvt_base::partial) { pbase = const_cast<char_type*>(__e); } } else return traits_type::eof(); } while (__r == codecvt_base::partial); } } return traits_type::not_eof(__c); } template <class _CharT> streamsize __stdoutbuf<_CharT>::xsputn(const char_type* __s, streamsize __n) { if (__always_noconv_) return fwrite(__s, sizeof(char_type), __n, __file_); streamsize __i = 0; for (; __i < __n; ++__i, ++__s) if (overflow(traits_type::to_int_type(*__s)) == traits_type::eof()) break; return __i; } template <class _CharT> int __stdoutbuf<_CharT>::sync() { char __extbuf[__limit]; codecvt_base::result __r; do { char* __extbe; __r = __cv_->unshift(*__st_, __extbuf, __extbuf + sizeof(__extbuf), __extbe); size_t __nmemb = static_cast<size_t>(__extbe - __extbuf); if (fwrite(__extbuf, 1, __nmemb, __file_) != __nmemb) return -1; } while (__r == codecvt_base::partial); if (__r == codecvt_base::error) return -1; if (fflush(__file_)) return -1; return 0; } template <class _CharT> void __stdoutbuf<_CharT>::imbue(const locale& __loc) { sync(); __cv_ = &use_facet<codecvt<char_type, char, state_type> >(__loc); __always_noconv_ = __cv_->always_noconv(); } _LIBCPP_END_NAMESPACE_STD _LIBCPP_POP_MACROS #endif // _LIBCPP___STD_STREAM
Upload File
Create Folder