aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/streambuf
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/streambuf')
-rw-r--r--libcxx/include/streambuf40
1 files changed, 22 insertions, 18 deletions
diff --git a/libcxx/include/streambuf b/libcxx/include/streambuf
index 095ac7d3ad83..b0e65b13151f 100644
--- a/libcxx/include/streambuf
+++ b/libcxx/include/streambuf
@@ -110,7 +110,7 @@ protected:
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
#include <__fwd/streambuf.h>
-#include <cstdint>
+#include <climits>
#include <ios>
#include <iosfwd>
#include <version>
@@ -239,9 +239,9 @@ protected:
void swap(basic_streambuf& __rhs);
// 27.6.2.3.2 Get area:
- _LIBCPP_INLINE_VISIBILITY char_type* eback() const {return __binp_;}
- _LIBCPP_INLINE_VISIBILITY char_type* gptr() const {return __ninp_;}
- _LIBCPP_INLINE_VISIBILITY char_type* egptr() const {return __einp_;}
+ _LIBCPP_HIDE_FROM_ABI char_type* eback() const {return __binp_;}
+ _LIBCPP_HIDE_FROM_ABI char_type* gptr() const {return __ninp_;}
+ _LIBCPP_HIDE_FROM_ABI char_type* egptr() const {return __einp_;}
inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
void gbump(int __n) { __ninp_ += __n; }
@@ -254,14 +254,14 @@ protected:
}
// 27.6.2.3.3 Put area:
- _LIBCPP_INLINE_VISIBILITY char_type* pbase() const {return __bout_;}
- _LIBCPP_INLINE_VISIBILITY char_type* pptr() const {return __nout_;}
- _LIBCPP_INLINE_VISIBILITY char_type* epptr() const {return __eout_;}
+ _LIBCPP_HIDE_FROM_ABI char_type* pbase() const {return __bout_;}
+ _LIBCPP_HIDE_FROM_ABI char_type* pptr() const {return __nout_;}
+ _LIBCPP_HIDE_FROM_ABI char_type* epptr() const {return __eout_;}
inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
void pbump(int __n) { __nout_ += __n; }
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_HIDE_FROM_ABI
void __pbump(streamsize __n) { __nout_ += __n; }
inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
@@ -351,13 +351,13 @@ template <class _CharT, class _Traits>
void
basic_streambuf<_CharT, _Traits>::swap(basic_streambuf& __sb)
{
- _VSTD::swap(__loc_, __sb.__loc_);
- _VSTD::swap(__binp_, __sb.__binp_);
- _VSTD::swap(__ninp_, __sb.__ninp_);
- _VSTD::swap(__einp_, __sb.__einp_);
- _VSTD::swap(__bout_, __sb.__bout_);
- _VSTD::swap(__nout_, __sb.__nout_);
- _VSTD::swap(__eout_, __sb.__eout_);
+ std::swap(__loc_, __sb.__loc_);
+ std::swap(__binp_, __sb.__binp_);
+ std::swap(__ninp_, __sb.__ninp_);
+ std::swap(__einp_, __sb.__einp_);
+ std::swap(__bout_, __sb.__bout_);
+ std::swap(__nout_, __sb.__nout_);
+ std::swap(__eout_, __sb.__eout_);
}
template <class _CharT, class _Traits>
@@ -413,8 +413,8 @@ basic_streambuf<_CharT, _Traits>::xsgetn(char_type* __s, streamsize __n)
{
if (__ninp_ < __einp_)
{
- const streamsize __len = _VSTD::min(static_cast<streamsize>(INT_MAX),
- _VSTD::min(__einp_ - __ninp_, __n - __i));
+ const streamsize __len = std::min(static_cast<streamsize>(INT_MAX),
+ std::min(__einp_ - __ninp_, __n - __i));
traits_type::copy(__s, __ninp_, __len);
__s += __len;
__i += __len;
@@ -472,7 +472,7 @@ basic_streambuf<_CharT, _Traits>::xsputn(const char_type* __s, streamsize __n)
}
else
{
- streamsize __chunk_size = _VSTD::min(__eout_ - __nout_, __n - __i);
+ streamsize __chunk_size = std::min(__eout_ - __nout_, __n - __i);
traits_type::copy(__nout_, __s, __chunk_size);
__nout_ += __chunk_size;
__s += __chunk_size;
@@ -499,4 +499,8 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
+# include <cstdint>
+#endif
+
#endif // _LIBCPP_STREAMBUF