Date: Thu, 29 Nov 2012 13:35:44 +0000 (UTC) From: David Chisnall <theraven@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243673 - head/contrib/libc++/include Message-ID: <201211291335.qATDZiLX086281@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: theraven Date: Thu Nov 29 13:35:44 2012 New Revision: 243673 URL: http://svnweb.freebsd.org/changeset/base/243673 Log: Merge new libc++ into head. Modified: head/contrib/libc++/include/exception head/contrib/libc++/include/iterator head/contrib/libc++/include/locale Directory Properties: head/contrib/libc++/ (props changed) Modified: head/contrib/libc++/include/exception ============================================================================== --- head/contrib/libc++/include/exception Thu Nov 29 13:29:58 2012 (r243672) +++ head/contrib/libc++/include/exception Thu Nov 29 13:35:44 2012 (r243673) @@ -143,7 +143,7 @@ public: {return !(__x == __y);} friend exception_ptr current_exception() _NOEXCEPT; - _LIBCPP_NORETURN friend void rethrow_exception(exception_ptr); + friend void rethrow_exception(exception_ptr); }; template<class _Ep> Modified: head/contrib/libc++/include/iterator ============================================================================== --- head/contrib/libc++/include/iterator Thu Nov 29 13:29:58 2012 (r243672) +++ head/contrib/libc++/include/iterator Thu Nov 29 13:35:44 2012 (r243673) @@ -317,6 +317,10 @@ template <class T, size_t N> T* end(T (& #include <type_traits> #include <cstddef> #include <iosfwd> +#if __APPLE__ +#include <Availability.h> +#endif + #ifdef _LIBCPP_DEBUG #include <cassert> #endif @@ -795,7 +799,7 @@ public: typedef basic_streambuf<_CharT,_Traits> streambuf_type; typedef basic_istream<_CharT,_Traits> istream_type; private: - streambuf_type* __sbuf_; + mutable streambuf_type* __sbuf_; class __proxy { @@ -809,13 +813,14 @@ private: }; _LIBCPP_INLINE_VISIBILITY - void __test_for_eof() + bool __test_for_eof() const { if (__sbuf_ && traits_type::eq_int_type(__sbuf_->sgetc(), traits_type::eof())) __sbuf_ = 0; + return __sbuf_ == 0; } public: - _LIBCPP_INLINE_VISIBILITY istreambuf_iterator() _NOEXCEPT : __sbuf_(0) {} + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR istreambuf_iterator() _NOEXCEPT : __sbuf_(0) {} _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(istream_type& __s) _NOEXCEPT : __sbuf_(__s.rdbuf()) {__test_for_eof();} _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(streambuf_type* __s) _NOEXCEPT @@ -828,19 +833,16 @@ public: _LIBCPP_INLINE_VISIBILITY char_type* operator->() const {return nullptr;} _LIBCPP_INLINE_VISIBILITY istreambuf_iterator& operator++() { - if (traits_type::eq_int_type(__sbuf_->snextc(), traits_type::eof())) - __sbuf_ = 0; + __sbuf_->sbumpc(); return *this; } _LIBCPP_INLINE_VISIBILITY __proxy operator++(int) { - char_type __c = __sbuf_->sgetc(); - ++(*this); - return __proxy(__c, __sbuf_); + return __proxy(__sbuf_->sbumpc(), __sbuf_); } _LIBCPP_INLINE_VISIBILITY bool equal(const istreambuf_iterator& __b) const - {return (__sbuf_ == 0) == (__b.__sbuf_ == 0);} + {return __test_for_eof() == __b.__test_for_eof();} }; template <class _CharT, class _Traits> @@ -882,6 +884,10 @@ public: _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator& operator++(int) {return *this;} _LIBCPP_INLINE_VISIBILITY bool failed() const _NOEXCEPT {return __sbuf_ == 0;} +#if !defined(__APPLE__) || \ + (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED > __MAC_10_8) || \ + (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED > __IPHONE_6_0) + template <class _Ch, class _Tr> friend _LIBCPP_HIDDEN @@ -889,6 +895,7 @@ public: __pad_and_output(ostreambuf_iterator<_Ch, _Tr> __s, const _Ch* __ob, const _Ch* __op, const _Ch* __oe, ios_base& __iob, _Ch __fl); +#endif }; template <class _Iter> Modified: head/contrib/libc++/include/locale ============================================================================== --- head/contrib/libc++/include/locale Thu Nov 29 13:29:58 2012 (r243672) +++ head/contrib/libc++/include/locale Thu Nov 29 13:35:44 2012 (r243673) @@ -192,6 +192,10 @@ template <class charT> class messages_by #include <nl_types.h> #endif // !_WIN32 +#if __APPLE__ +#include <Availability.h> +#endif + #include <__undef_min_max> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) @@ -1587,6 +1591,10 @@ __pad_and_output(_OutputIterator __s, return __s; } +#if !defined(__APPLE__) || \ + (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED > __MAC_10_8) || \ + (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED > __IPHONE_6_0) + template <class _CharT, class _Traits> _LIBCPP_HIDDEN ostreambuf_iterator<_CharT, _Traits> @@ -1633,6 +1641,8 @@ __pad_and_output(ostreambuf_iterator<_Ch return __s; } +#endif + template <class _CharT, class _OutputIterator> _OutputIterator num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211291335.qATDZiLX086281>