[libcxx] r239004 - While applying N4258, I forgot about LWG#2455, which modified the modifications. Correct those - h/t: Howard

Marshall Clow mclow.lists at gmail.com
Wed Jun 3 19:05:41 PDT 2015


Author: marshall
Date: Wed Jun  3 21:05:41 2015
New Revision: 239004

URL: http://llvm.org/viewvc/llvm-project?rev=239004&view=rev
Log:
While applying N4258, I forgot about LWG#2455, which modified the modifications. Correct those - h/t: Howard

Modified:
    libcxx/trunk/include/string
    libcxx/trunk/include/vector
    libcxx/trunk/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp
    libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp
    libcxx/trunk/test/std/containers/sequences/vector/vector.cons/default_noexcept.pass.cpp
    libcxx/trunk/test/std/strings/basic.string/string.cons/default_noexcept.pass.cpp

Modified: libcxx/trunk/include/string
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/string?rev=239004&r1=239003&r2=239004&view=diff
==============================================================================
--- libcxx/trunk/include/string (original)
+++ libcxx/trunk/include/string Wed Jun  3 21:05:41 2015
@@ -1321,11 +1321,7 @@ public:
     static const size_type npos = -1;
 
     _LIBCPP_INLINE_VISIBILITY basic_string()
-#if _LIBCPP_STD_VER <= 14
         _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value);
-#else
-        _NOEXCEPT;
-#endif
 
     _LIBCPP_INLINE_VISIBILITY explicit basic_string(const allocator_type& __a)
 #if _LIBCPP_STD_VER <= 14
@@ -1943,11 +1939,7 @@ basic_string<_CharT, _Traits, _Allocator
 template <class _CharT, class _Traits, class _Allocator>
 inline _LIBCPP_INLINE_VISIBILITY
 basic_string<_CharT, _Traits, _Allocator>::basic_string()
-#if _LIBCPP_STD_VER <= 14
-        _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
-#else
-        _NOEXCEPT
-#endif
+    _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
 {
 #if _LIBCPP_DEBUG_LEVEL >= 2
     __get_db()->__insert_c(this);

Modified: libcxx/trunk/include/vector
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/vector?rev=239004&r1=239003&r2=239004&view=diff
==============================================================================
--- libcxx/trunk/include/vector (original)
+++ libcxx/trunk/include/vector Wed Jun  3 21:05:41 2015
@@ -500,12 +500,7 @@ public:
                   "Allocator::value_type must be same type as value_type");
 
     _LIBCPP_INLINE_VISIBILITY
-    vector()
-#if _LIBCPP_STD_VER <= 14
-        _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
-#else
-        _NOEXCEPT
-#endif
+    vector() _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
         {
 #if _LIBCPP_DEBUG_LEVEL >= 2
             __get_db()->__insert_c(this);
@@ -2170,12 +2165,7 @@ private:
 
 public:
     _LIBCPP_INLINE_VISIBILITY
-    vector()
-#if _LIBCPP_STD_VER <= 14
-        _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value);
-#else
-        _NOEXCEPT;
-#endif
+    vector() _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value);
 
     _LIBCPP_INLINE_VISIBILITY explicit vector(const allocator_type& __a)
 #if _LIBCPP_STD_VER <= 14
@@ -2569,11 +2559,7 @@ vector<bool, _Allocator>::__construct_at
 template <class _Allocator>
 inline _LIBCPP_INLINE_VISIBILITY
 vector<bool, _Allocator>::vector()
-#if _LIBCPP_STD_VER <= 14
-        _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
-#else
-        _NOEXCEPT
-#endif
+    _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
     : __begin_(nullptr),
       __size_(0),
       __cap_alloc_(0)

Modified: libcxx/trunk/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp?rev=239004&r1=239003&r2=239004&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp Wed Jun  3 21:05:41 2015
@@ -39,21 +39,11 @@ int main()
     }
     {
         typedef std::vector<bool, other_allocator<bool>> C;
-// See N4258 - vector<T, Allocator>::basic_string() noexcept;
-#if TEST_STD_VER <= 14
         static_assert(!std::is_nothrow_default_constructible<C>::value, "");
-#else
-        static_assert( std::is_nothrow_default_constructible<C>::value, "");
-#endif
     }
     {
         typedef std::vector<bool, some_alloc<bool>> C;
-// See N4258 - vector<T, Allocator>::basic_string() noexcept;
-#if TEST_STD_VER <= 14
         static_assert(!std::is_nothrow_default_constructible<C>::value, "");
-#else
-        static_assert( std::is_nothrow_default_constructible<C>::value, "");
-#endif
     }
 #endif
 }

Modified: libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp?rev=239004&r1=239003&r2=239004&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp Wed Jun  3 21:05:41 2015
@@ -15,6 +15,7 @@
 #include <vector>
 #include <cassert>
 
+#include "test_macros.h"
 #include "test_allocator.h"
 #include "../../../NotConstructible.h"
 #include "../../../stack_allocator.h"

Modified: libcxx/trunk/test/std/containers/sequences/vector/vector.cons/default_noexcept.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector/vector.cons/default_noexcept.pass.cpp?rev=239004&r1=239003&r2=239004&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/vector/vector.cons/default_noexcept.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/vector/vector.cons/default_noexcept.pass.cpp Wed Jun  3 21:05:41 2015
@@ -41,21 +41,11 @@ int main()
     }
     {
         typedef std::vector<MoveOnly, other_allocator<MoveOnly>> C;
-// See N4258 - vector<T, Allocator>::basic_string() noexcept;
-#if TEST_STD_VER <= 14
         static_assert(!std::is_nothrow_default_constructible<C>::value, "");
-#else
-        static_assert( std::is_nothrow_default_constructible<C>::value, "");
-#endif
     }
     {
         typedef std::vector<MoveOnly, some_alloc<MoveOnly>> C;
-// See N4258 - vector<T, Allocator>::basic_string() noexcept;
-#if TEST_STD_VER <= 14
         static_assert(!std::is_nothrow_default_constructible<C>::value, "");
-#else
-        static_assert( std::is_nothrow_default_constructible<C>::value, "");
-#endif
     }
 #endif
 }

Modified: libcxx/trunk/test/std/strings/basic.string/string.cons/default_noexcept.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.cons/default_noexcept.pass.cpp?rev=239004&r1=239003&r2=239004&view=diff
==============================================================================
--- libcxx/trunk/test/std/strings/basic.string/string.cons/default_noexcept.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/basic.string/string.cons/default_noexcept.pass.cpp Wed Jun  3 21:05:41 2015
@@ -40,12 +40,7 @@ int main()
     }
     {
         typedef std::basic_string<char, std::char_traits<char>, some_alloc<char>> C;
-// See N4258 - basic_string<char, traits, Allocator>::basic_string() noexcept;
-#if TEST_STD_VER <= 14
         static_assert(!std::is_nothrow_default_constructible<C>::value, "");
-#else
-        static_assert( std::is_nothrow_default_constructible<C>::value, "");
-#endif
     }
 #endif
 }





More information about the cfe-commits mailing list