[libcxx] r324911 - Implement LWG#2908 - The less-than operator for shared pointers could do more, and mark 2878 as complete as well (we already do that)

Marshall Clow via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 12 09:26:40 PST 2018


Author: marshall
Date: Mon Feb 12 09:26:40 2018
New Revision: 324911

URL: http://llvm.org/viewvc/llvm-project?rev=324911&view=rev
Log:
Implement LWG#2908 - The less-than operator for shared pointers could do more, and mark 2878 as complete as well (we already do that)

Modified:
    libcxx/trunk/include/memory
    libcxx/trunk/www/cxx1z_status.html

Modified: libcxx/trunk/include/memory
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/memory?rev=324911&r1=324910&r2=324911&view=diff
==============================================================================
--- libcxx/trunk/include/memory (original)
+++ libcxx/trunk/include/memory Mon Feb 12 09:26:40 2018
@@ -4805,8 +4805,13 @@ inline _LIBCPP_INLINE_VISIBILITY
 bool
 operator<(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
 {
+#if _LIBCPP_STD_VER <= 11
     typedef typename common_type<_Tp*, _Up*>::type _Vp;
     return less<_Vp>()(__x.get(), __y.get());
+#else
+    return less<>()(__x.get(), __y.get());
+#endif
+
 }
 
 template<class _Tp, class _Up>

Modified: libcxx/trunk/www/cxx1z_status.html
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/cxx1z_status.html?rev=324911&r1=324910&r2=324911&view=diff
==============================================================================
--- libcxx/trunk/www/cxx1z_status.html (original)
+++ libcxx/trunk/www/cxx1z_status.html Mon Feb 12 09:26:40 2018
@@ -483,13 +483,13 @@
 	<tr><td><a href="https://wg21.link/LWG2874">2874</a></td><td>Constructor shared_ptr::shared_ptr(Y*) should be constrained</td><td>Kona</td><td></td></tr>
 	<tr><td><a href="https://wg21.link/LWG2875">2875</a></td><td>shared_ptr::shared_ptr(Y*, D, […]) constructors should be constrained</td><td>Kona</td><td></td></tr>
 	<tr><td><a href="https://wg21.link/LWG2876">2876</a></td><td>shared_ptr::shared_ptr(const weak_ptr<Y>&) constructor should be constrained</td><td>Kona</td><td></td></tr>
-	<tr><td><a href="https://wg21.link/LWG2878">2878</a></td><td>Missing DefaultConstructible requirement for istream_iterator default constructor</td><td>Kona</td><td></td></tr>
+	<tr><td><a href="https://wg21.link/LWG2878">2878</a></td><td>Missing DefaultConstructible requirement for istream_iterator default constructor</td><td>Kona</td><td>Complete</td></tr>
 	<tr><td><a href="https://wg21.link/LWG2890">2890</a></td><td>The definition of 'object state' applies only to class types</td><td>Kona</td><td>Complete</td></tr>
 	<tr><td><a href="https://wg21.link/LWG2900">2900</a></td><td>The copy and move constructors of optional are not constexpr</td><td>Kona</td><td>Complete</td></tr>
 	<tr><td><a href="https://wg21.link/LWG2903">2903</a></td><td>The form of initialization for the emplace-constructors is not specified</td><td>Kona</td><td>Complete</td></tr>
 	<tr><td><a href="https://wg21.link/LWG2904">2904</a></td><td>Make variant move-assignment more exception safe</td><td>Kona</td><td>Complete</td></tr>
 	<tr><td><a href="https://wg21.link/LWG2905">2905</a></td><td>is_constructible_v<unique_ptr<P, D>, P, D const &> should be false when D is not copy constructible</td><td>Kona</td><td>Complete</td></tr>
-	<tr><td><a href="https://wg21.link/LWG2908">2908</a></td><td>The less-than operator for shared pointers could do more</td><td>Kona</td><td></td></tr>
+	<tr><td><a href="https://wg21.link/LWG2908">2908</a></td><td>The less-than operator for shared pointers could do more</td><td>Kona</td><td>Complete</td></tr>
 	<tr><td><a href="https://wg21.link/LWG2911">2911</a></td><td>An is_aggregate type trait is needed</td><td>Kona</td><td>Complete</td></tr>
 	<tr><td><a href="https://wg21.link/LWG2921">2921</a></td><td>packaged_task and type-erased allocators</td><td>Kona</td><td>Complete</td></tr>
 	<tr><td><a href="https://wg21.link/LWG2934">2934</a></td><td>optional<const T> doesn't compare with T</td><td>Kona</td><td>Complete</td></tr>
@@ -504,7 +504,7 @@
 <!-- 	<tr><td></td><td></td><td></td><td></td></tr> -->
   </table>
 
-  <p>Last Updated: 25-Jan-2018</p>
+  <p>Last Updated: 12-Feb-2018</p>
 </div>
 </body>
 </html>




More information about the cfe-commits mailing list