[cfe-commits] [libcxx] r167980 - in /libcxx/trunk/include: iterator locale

Howard Hinnant hhinnant at apple.com
Wed Nov 14 13:17:15 PST 2012


Author: hhinnant
Date: Wed Nov 14 15:17:15 2012
New Revision: 167980

URL: http://llvm.org/viewvc/llvm-project?rev=167980&view=rev
Log:
Restrict optimized __pad_and_output implementation detail to desired releases.

Modified:
    libcxx/trunk/include/iterator
    libcxx/trunk/include/locale

Modified: libcxx/trunk/include/iterator
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/iterator?rev=167980&r1=167979&r2=167980&view=diff
==============================================================================
--- libcxx/trunk/include/iterator (original)
+++ libcxx/trunk/include/iterator Wed Nov 14 15:17:15 2012
@@ -317,6 +317,10 @@
 #include <type_traits>
 #include <cstddef>
 #include <iosfwd>
+#if __APPLE__
+#include <Availability.h>
+#endif
+
 #ifdef _LIBCPP_DEBUG
 #include <cassert>
 #endif
@@ -882,6 +886,10 @@
     _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 +897,7 @@
     __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: libcxx/trunk/include/locale
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/locale?rev=167980&r1=167979&r2=167980&view=diff
==============================================================================
--- libcxx/trunk/include/locale (original)
+++ libcxx/trunk/include/locale Wed Nov 14 15:17:15 2012
@@ -192,6 +192,10 @@
 #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 @@
     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 @@
     return __s;
 }
 
+#endif
+
 template <class _CharT, class _OutputIterator>
 _OutputIterator
 num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,





More information about the cfe-commits mailing list