[libcxx] r271240 - Mark LWG issue #2585 as complete

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Mon May 30 18:03:08 PDT 2016


Author: ericwf
Date: Mon May 30 20:03:07 2016
New Revision: 271240

URL: http://llvm.org/viewvc/llvm-project?rev=271240&view=rev
Log:
Mark LWG issue #2585 as complete

Modified:
    libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size_value.pass.cpp
    libcxx/trunk/www/cxx1z_status.html

Modified: libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size_value.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size_value.pass.cpp?rev=271240&r1=271239&r2=271240&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size_value.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size_value.pass.cpp Mon May 30 20:03:07 2016
@@ -14,9 +14,14 @@
 #include <forward_list>
 #include <cassert>
 
+#include "test_macros.h"
 #include "DefaultOnly.h"
 #include "min_allocator.h"
 
+#if TEST_STD_VER >= 11
+#include "container_test_types.h"
+#endif
+
 int main()
 {
     {
@@ -49,7 +54,7 @@ int main()
         assert(*next(c.begin(), 4) == 10);
         assert(*next(c.begin(), 5) == 10);
     }
-#if __cplusplus >= 201103L
+#if TEST_STD_VER >= 11
     {
         typedef int T;
         typedef std::forward_list<T, min_allocator<T>> C;
@@ -80,5 +85,19 @@ int main()
         assert(*next(c.begin(), 4) == 10);
         assert(*next(c.begin(), 5) == 10);
     }
+    {
+        // Test that the allocator's construct method is being used to
+        // construct the new elements and that it's called exactly N times.
+        typedef int T;
+        typedef std::forward_list<int, ContainerTestAllocator<int, int>> Container;
+        ConstructController* cc = getConstructController();
+        cc->reset();
+        {
+            Container c;
+            cc->expect<int const&>(6);
+            c.resize(6, 42);
+            assert(!cc->unchecked());
+        }
+    }
 #endif
 }

Modified: libcxx/trunk/www/cxx1z_status.html
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/cxx1z_status.html?rev=271240&r1=271239&r2=271240&view=diff
==============================================================================
--- libcxx/trunk/www/cxx1z_status.html (original)
+++ libcxx/trunk/www/cxx1z_status.html Mon May 30 20:03:07 2016
@@ -228,7 +228,7 @@
 	<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2581">2581</a></td><td>Specialization of <tt><type_traits></tt> variable templates should be prohibited</td><td>Jacksonville</td><td>Complete</td></tr>
 	<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2582">2582</a></td><td>§[res.on.functions]/2's prohibition against incomplete types shouldn't apply to type traits</td><td>Jacksonville</td><td></td></tr>
 	<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2583">2583</a></td><td>There is no way to supply an allocator for <tt>basic_string(str, pos)</tt></td><td>Jacksonville</td><td>Complete</td></tr>
-	<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2585">2585</a></td><td><tt>forward_list::resize(size_type, const value_type&)</tt> effects incorrect</td><td>Jacksonville</td><td></td></tr>
+	<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2585">2585</a></td><td><tt>forward_list::resize(size_type, const value_type&)</tt> effects incorrect</td><td>Jacksonville</td><td>Complete</td></tr>
 	<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2586">2586</a></td><td>Wrong value category used in <tt>scoped_allocator_adaptor::construct()</tt></td><td>Jacksonville</td><td></td></tr>
 	<tr><td><a href="http://cplusplus.github.io/LWG/lwg-defects.html#2590">2590</a></td><td>Aggregate initialization for <tt>std::array</tt></td><td>Jacksonville</td><td>Complete</td></tr>
 




More information about the cfe-commits mailing list