[cfe-commits] [libcxx] r136574 - in /libcxx/branches/apple: include/__config include/memory include/type_traits include/utility include/valarray src/exception.cpp

Howard Hinnant hhinnant at apple.com
Sat Jul 30 10:35:20 PDT 2011


Author: hhinnant
Date: Sat Jul 30 12:35:20 2011
New Revision: 136574

URL: http://llvm.org/viewvc/llvm-project?rev=136574&view=rev
Log:
Synch up with recent changes in trunk

Modified:
    libcxx/branches/apple/include/__config
    libcxx/branches/apple/include/memory
    libcxx/branches/apple/include/type_traits
    libcxx/branches/apple/include/utility
    libcxx/branches/apple/include/valarray
    libcxx/branches/apple/src/exception.cpp

Modified: libcxx/branches/apple/include/__config
URL: http://llvm.org/viewvc/llvm-project/libcxx/branches/apple/include/__config?rev=136574&r1=136573&r2=136574&view=diff
==============================================================================
--- libcxx/branches/apple/include/__config (original)
+++ libcxx/branches/apple/include/__config Sat Jul 30 12:35:20 2011
@@ -146,6 +146,9 @@
 
 #if !(__has_feature(cxx_auto_type))
 #define _LIBCPP_HAS_NO_AUTO_TYPE
+#endif
+
+#if !(__has_feature(cxx_access_control_sfinae)) || !__has_feature(cxx_trailing_return)
 #define _LIBCPP_HAS_NO_ADVANCED_SFINAE
 #endif
 

Modified: libcxx/branches/apple/include/memory
URL: http://llvm.org/viewvc/llvm-project/libcxx/branches/apple/include/memory?rev=136574&r1=136573&r2=136574&view=diff
==============================================================================
--- libcxx/branches/apple/include/memory (original)
+++ libcxx/branches/apple/include/memory Sat Jul 30 12:35:20 2011
@@ -1294,7 +1294,7 @@
 
 #endif  // _LIBCPP_HAS_NO_ADVANCED_SFINAE
 
-#ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE
+#if !defined(_LIBCPP_HAS_NO_ADVANCED_SFINAE) && !defined(_LIBCPP_HAS_NO_VARIADICS)
 
 template <class _Alloc, class _Tp, class ..._Args>
 decltype(_VSTD::declval<_Alloc>().construct(_VSTD::declval<_Tp*>(),

Modified: libcxx/branches/apple/include/type_traits
URL: http://llvm.org/viewvc/llvm-project/libcxx/branches/apple/include/type_traits?rev=136574&r1=136573&r2=136574&view=diff
==============================================================================
--- libcxx/branches/apple/include/type_traits (original)
+++ libcxx/branches/apple/include/type_traits Sat Jul 30 12:35:20 2011
@@ -3014,11 +3014,15 @@
 
 template <class _Tp>
 inline _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE
 typename enable_if
 <
     is_move_constructible<_Tp>::value &&
     is_move_assignable<_Tp>::value
 >::type
+#else
+void
+#endif
 swap(_Tp& __x, _Tp& __y) _NOEXCEPT_(is_nothrow_move_constructible<_Tp>::value &&
                                     is_nothrow_move_assignable<_Tp>::value)
 {

Modified: libcxx/branches/apple/include/utility
URL: http://llvm.org/viewvc/llvm-project/libcxx/branches/apple/include/utility?rev=136574&r1=136573&r2=136574&view=diff
==============================================================================
--- libcxx/branches/apple/include/utility (original)
+++ libcxx/branches/apple/include/utility Sat Jul 30 12:35:20 2011
@@ -226,9 +226,12 @@
 
     template<class _U1, class _U2>
         _LIBCPP_INLINE_VISIBILITY
-        pair(const pair<_U1, _U2>& __p,
-                 typename enable_if<is_constructible<_T1, _U1>::value &&
-                                    is_constructible<_T2, _U2>::value>::type* = 0)
+        pair(const pair<_U1, _U2>& __p
+#ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE
+                 ,typename enable_if<is_constructible<_T1, _U1>::value &&
+                                    is_constructible<_T2, _U2>::value>::type* = 0
+#endif
+                                      )
             : first(__p.first), second(__p.second) {}
 
     _LIBCPP_INLINE_VISIBILITY

Modified: libcxx/branches/apple/include/valarray
URL: http://llvm.org/viewvc/llvm-project/libcxx/branches/apple/include/valarray?rev=136574&r1=136573&r2=136574&view=diff
==============================================================================
--- libcxx/branches/apple/include/valarray (original)
+++ libcxx/branches/apple/include/valarray Sat Jul 30 12:35:20 2011
@@ -817,6 +817,8 @@
     valarray& operator=(const gslice_array<value_type>& __ga);
     valarray& operator=(const mask_array<value_type>& __ma);
     valarray& operator=(const indirect_array<value_type>& __ia);
+    template <class _ValExpr>
+        valarray& operator=(const __val_expr<_ValExpr>& __v);
 
     // element access:
     _LIBCPP_INLINE_VISIBILITY
@@ -2959,6 +2961,21 @@
 }
 
 template <class _Tp>
+template <class _ValExpr>
+inline _LIBCPP_INLINE_VISIBILITY
+valarray<_Tp>&
+valarray<_Tp>::operator=(const __val_expr<_ValExpr>& __v)
+{
+    size_t __n = __v.size();
+    if (size() != __n)
+        resize(__n);
+    value_type* __t = __begin_;
+    for (size_t __i = 0; __i != __n; ++__t, ++__i)
+        *__t = result_type(__v[__i]);
+    return *this;
+}
+
+template <class _Tp>
 inline _LIBCPP_INLINE_VISIBILITY
 __val_expr<__slice_expr<const valarray<_Tp>&> >
 valarray<_Tp>::operator[](slice __s) const

Modified: libcxx/branches/apple/src/exception.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/branches/apple/src/exception.cpp?rev=136574&r1=136573&r2=136574&view=diff
==============================================================================
--- libcxx/branches/apple/src/exception.cpp (original)
+++ libcxx/branches/apple/src/exception.cpp Sat Jul 30 12:35:20 2011
@@ -56,6 +56,7 @@
     return __sync_fetch_and_add(&__terminate_handler, (std::terminate_handler)0);
 }
 
+_ATTRIBUTE(noreturn)
 void
 std::terminate() _NOEXCEPT
 {





More information about the cfe-commits mailing list