diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-12-30 13:11:17 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-12-30 13:11:17 +0000 |
commit | 03226c5e0632268ffc778414ecb421fccead4367 (patch) | |
tree | fa575be2b3826868c66506e7153d7196e25c5a17 /libcxx/include/ios | |
parent | 46d95400f4b55666ab6a6678ccd71448da4e720e (diff) | |
download | bcm5719-llvm-03226c5e0632268ffc778414ecb421fccead4367.tar.gz bcm5719-llvm-03226c5e0632268ffc778414ecb421fccead4367.zip |
Revert r290750 - Fix PR19460 - std::ios is convertible to int.
llvm-svn: 290752
Diffstat (limited to 'libcxx/include/ios')
-rw-r--r-- | libcxx/include/ios | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/libcxx/include/ios b/libcxx/include/ios index dfeb1f62eed..cbea478a74a 100644 --- a/libcxx/include/ios +++ b/libcxx/include/ios @@ -585,22 +585,9 @@ public: typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; -#if defined(_LIBCPP_CXX03_LANG) -private: - struct __bool_tag {}; - typedef void (basic_ios::*_BoolType)(__bool_tag) const; - void __true_value(__bool_tag) const {} - -public: - _LIBCPP_ALWAYS_INLINE - operator _BoolType() const { - return !fail() ? &basic_ios::__true_value : nullptr; - } -#else _LIBCPP_ALWAYS_INLINE - _LIBCPP_EXPLICIT operator bool() const {return !fail();} -#endif - + _LIBCPP_EXPLICIT + operator bool() const {return !fail();} _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);} |