[libcxx] r274243 - Implement LWG#2684: 'priority_queue lacking comparator typedef'. We already did this, just added tests

Marshall Clow via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 30 09:03:50 PDT 2016


Author: marshall
Date: Thu Jun 30 11:03:50 2016
New Revision: 274243

URL: http://llvm.org/viewvc/llvm-project?rev=274243&view=rev
Log:
Implement LWG#2684: 'priority_queue lacking comparator typedef'. We already did this, just added tests

Modified:
    libcxx/trunk/test/std/containers/container.adaptors/priority.queue/types.pass.cpp
    libcxx/trunk/www/cxx1z_status.html

Modified: libcxx/trunk/test/std/containers/container.adaptors/priority.queue/types.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/container.adaptors/priority.queue/types.pass.cpp?rev=274243&r1=274242&r2=274243&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/container.adaptors/priority.queue/types.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/container.adaptors/priority.queue/types.pass.cpp Thu Jun 30 11:03:50 2016
@@ -15,6 +15,7 @@
 // {
 // public:
 //     typedef Container                                container_type;
+//     typedef Compare                                  value_compare; // LWG#2684
 //     typedef typename container_type::value_type      value_type;
 //     typedef typename container_type::reference       reference;
 //     typedef typename container_type::const_reference const_reference;
@@ -54,6 +55,9 @@ int main()
     static_assert(( std::is_same<std::priority_queue<int>::reference, std::vector<int>::reference>::value), "");
     static_assert(( std::is_same<std::priority_queue<int>::const_reference, std::vector<int>::const_reference>::value), "");
     static_assert(( std::is_same<std::priority_queue<int>::size_type, std::vector<int>::size_type>::value), "");
+    static_assert(( std::is_same<std::priority_queue<int>::value_compare, std::less<int> >::value), "");
+    static_assert(( std::is_same<std::priority_queue<int, std::deque<int> >::value_compare, std::less<int> >::value), "");
+    static_assert(( std::is_same<std::priority_queue<int, std::deque<int>, std::greater<int> >::value_compare, std::greater<int> >::value), "");
     static_assert(( std::uses_allocator<std::priority_queue<int>, std::allocator<int> >::value), "");
     static_assert((!std::uses_allocator<std::priority_queue<int, C>, std::allocator<int> >::value), "");
     test t;

Modified: libcxx/trunk/www/cxx1z_status.html
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/cxx1z_status.html?rev=274243&r1=274242&r2=274243&view=diff
==============================================================================
--- libcxx/trunk/www/cxx1z_status.html (original)
+++ libcxx/trunk/www/cxx1z_status.html Thu Jun 30 11:03:50 2016
@@ -287,7 +287,7 @@
 	<tr><td><a href="http://wg21.link/LWG2673">2673</a></td><td>status() effects cannot be implemented as specified</td><td>Oulu</td><td></td></tr>
 	<tr><td><a href="http://wg21.link/LWG2674">2674</a></td><td>Bidirectional iterator requirement on path::iterator is very expensive</td><td>Oulu</td><td>Complete</td></tr>
 	<tr><td><a href="http://wg21.link/LWG2683">2683</a></td><td>filesystem::copy() says "no effects"</td><td>Oulu</td><td></td></tr>
-	<tr><td><a href="http://wg21.link/LWG2684">2684</a></td><td>priority_queue lacking comparator typedef</td><td>Oulu</td><td></td></tr>
+	<tr><td><a href="http://wg21.link/LWG2684">2684</a></td><td>priority_queue lacking comparator typedef</td><td>Oulu</td><td>Complete</td></tr>
 	<tr><td><a href="http://wg21.link/LWG2685">2685</a></td><td>shared_ptr deleters must not throw on move construction</td><td>Oulu</td><td></td></tr>
 	<tr><td><a href="http://wg21.link/LWG2687">2687</a></td><td>{inclusive,exclusive}_scan misspecified</td><td>Oulu</td><td></td></tr>
 	<tr><td><a href="http://wg21.link/LWG2688">2688</a></td><td>clamp misses preconditions and has extraneous condition on result</td><td>Oulu</td><td></td></tr>




More information about the cfe-commits mailing list