summaryrefslogtreecommitdiffstats
path: root/lib/libcxx/include/ios
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2019-02-04 16:55:44 +0000
committerpatrick <patrick@openbsd.org>2019-02-04 16:55:44 +0000
commit76c648e7a477ffb2a882ad5ffe523269bd9a3f6a (patch)
tree29d319d598650bab04e4f58e5e8769567e33091e /lib/libcxx/include/ios
parentImport libc++abi 7.0.1. (diff)
downloadwireguard-openbsd-76c648e7a477ffb2a882ad5ffe523269bd9a3f6a.tar.xz
wireguard-openbsd-76c648e7a477ffb2a882ad5ffe523269bd9a3f6a.zip
Import libc++ 7.0.1.
Diffstat (limited to 'lib/libcxx/include/ios')
-rw-r--r--lib/libcxx/include/ios39
1 files changed, 21 insertions, 18 deletions
diff --git a/lib/libcxx/include/ios b/lib/libcxx/include/ios
index 61d00b90ee0..040b2d4e04f 100644
--- a/lib/libcxx/include/ios
+++ b/lib/libcxx/include/ios
@@ -337,9 +337,9 @@ protected:
}
void init(void* __sb);
- _LIBCPP_ALWAYS_INLINE void* rdbuf() const {return __rdbuf_;}
+ _LIBCPP_INLINE_VISIBILITY void* rdbuf() const {return __rdbuf_;}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
void rdbuf(void* __sb)
{
__rdbuf_ = __sb;
@@ -351,7 +351,7 @@ protected:
void move(ios_base&);
void swap(ios_base&) _NOEXCEPT;
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
void set_rdbuf(void* __sb)
{
__rdbuf_ = __sb;
@@ -592,30 +592,33 @@ public:
typedef typename traits_type::pos_type pos_type;
typedef typename traits_type::off_type off_type;
+ static_assert((is_same<_CharT, typename traits_type::char_type>::value),
+ "traits_type::char_type must be the same type as CharT");
+
// __true_value will generate undefined references when linking unless
// we give it internal linkage.
#if defined(_LIBCPP_CXX03_LANG)
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
operator __cxx03_bool::__bool_type() const {
return !fail() ? &__cxx03_bool::__true_value : nullptr;
}
#else
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_LIBCPP_EXPLICIT operator bool() const {return !fail();}
#endif
- _LIBCPP_ALWAYS_INLINE bool operator!() const {return fail();}
- _LIBCPP_ALWAYS_INLINE iostate rdstate() const {return ios_base::rdstate();}
- _LIBCPP_ALWAYS_INLINE void clear(iostate __state = goodbit) {ios_base::clear(__state);}
- _LIBCPP_ALWAYS_INLINE void setstate(iostate __state) {ios_base::setstate(__state);}
- _LIBCPP_ALWAYS_INLINE bool good() const {return ios_base::good();}
- _LIBCPP_ALWAYS_INLINE bool eof() const {return ios_base::eof();}
- _LIBCPP_ALWAYS_INLINE bool fail() const {return ios_base::fail();}
- _LIBCPP_ALWAYS_INLINE bool bad() const {return ios_base::bad();}
+ _LIBCPP_INLINE_VISIBILITY bool operator!() const {return fail();}
+ _LIBCPP_INLINE_VISIBILITY iostate rdstate() const {return ios_base::rdstate();}
+ _LIBCPP_INLINE_VISIBILITY void clear(iostate __state = goodbit) {ios_base::clear(__state);}
+ _LIBCPP_INLINE_VISIBILITY void setstate(iostate __state) {ios_base::setstate(__state);}
+ _LIBCPP_INLINE_VISIBILITY bool good() const {return ios_base::good();}
+ _LIBCPP_INLINE_VISIBILITY bool eof() const {return ios_base::eof();}
+ _LIBCPP_INLINE_VISIBILITY bool fail() const {return ios_base::fail();}
+ _LIBCPP_INLINE_VISIBILITY bool bad() const {return ios_base::bad();}
- _LIBCPP_ALWAYS_INLINE iostate exceptions() const {return ios_base::exceptions();}
- _LIBCPP_ALWAYS_INLINE void exceptions(iostate __iostate) {ios_base::exceptions(__iostate);}
+ _LIBCPP_INLINE_VISIBILITY iostate exceptions() const {return ios_base::exceptions();}
+ _LIBCPP_INLINE_VISIBILITY void exceptions(iostate __iostate) {ios_base::exceptions(__iostate);}
// 27.5.4.1 Constructor/destructor:
_LIBCPP_INLINE_VISIBILITY
@@ -649,7 +652,7 @@ public:
char_type widen(char __c) const;
protected:
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
basic_ios() {// purposefully does no initialization
}
_LIBCPP_INLINE_VISIBILITY
@@ -658,7 +661,7 @@ protected:
_LIBCPP_INLINE_VISIBILITY
void move(basic_ios& __rhs);
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
void move(basic_ios&& __rhs) {move(__rhs);}
#endif
_LIBCPP_INLINE_VISIBILITY
@@ -667,7 +670,7 @@ protected:
void set_rdbuf(basic_streambuf<char_type, traits_type>* __sb);
private:
basic_ostream<char_type, traits_type>* __tie_;
- mutable int_type __fill_;
+ mutable int_type __fill_;
};
template <class _CharT, class _Traits>