[PATCH] D23961: Avoid embedded preprocessor directives in __tree

Dimitry Andric via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 27 12:40:27 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL279926: Avoid embedded preprocessor directives in __tree (authored by dim).

Changed prior to commit:
  https://reviews.llvm.org/D23961?vs=69492&id=69496#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D23961

Files:
  libcxx/trunk/include/__tree

Index: libcxx/trunk/include/__tree
===================================================================
--- libcxx/trunk/include/__tree
+++ libcxx/trunk/include/__tree
@@ -1111,14 +1111,15 @@
     void clear() _NOEXCEPT;
 
     void swap(__tree& __t)
+#if _LIBCPP_STD_VER <= 11
         _NOEXCEPT_(
             __is_nothrow_swappable<value_compare>::value
-#if _LIBCPP_STD_VER <= 11
             && (!__node_traits::propagate_on_container_swap::value ||
                  __is_nothrow_swappable<__node_allocator>::value)
-#endif
             );
-
+#else
+        _NOEXCEPT_(__is_nothrow_swappable<value_compare>::value);
+#endif
 
 #ifndef _LIBCPP_CXX03_LANG
     template <class _Key, class ..._Args>
@@ -1797,13 +1798,15 @@
 template <class _Tp, class _Compare, class _Allocator>
 void
 __tree<_Tp, _Compare, _Allocator>::swap(__tree& __t)
+#if _LIBCPP_STD_VER <= 11
         _NOEXCEPT_(
             __is_nothrow_swappable<value_compare>::value
-#if _LIBCPP_STD_VER <= 11
             && (!__node_traits::propagate_on_container_swap::value ||
                  __is_nothrow_swappable<__node_allocator>::value)
-#endif
             )
+#else
+        _NOEXCEPT_(__is_nothrow_swappable<value_compare>::value)
+#endif
 {
     using _VSTD::swap;
     swap(__begin_node_, __t.__begin_node_);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23961.69496.patch
Type: text/x-patch
Size: 1289 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160827/5cfdf903/attachment.bin>


More information about the cfe-commits mailing list