Implement LWG#2908 - The less-than operator for shared pointers could do more, and mark 2878 as complete as well (we already do that)
llvm-svn: 324911
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: c0db07299ed9cdc0383130b3c98391a2a62f0d46
diff --git a/include/memory b/include/memory
index 2d9d75f..bc5c4c6 100644
--- a/include/memory
+++ b/include/memory
@@ -4805,8 +4805,13 @@
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>