summaryrefslogtreecommitdiffstats
path: root/libcxx/include/memory
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2018-02-12 17:26:40 +0000
committerMarshall Clow <mclow.lists@gmail.com>2018-02-12 17:26:40 +0000
commitc0db07299ed9cdc0383130b3c98391a2a62f0d46 (patch)
tree886339bcbce739397632b33386c0c659fdb4a1c5 /libcxx/include/memory
parent0efe9bc9534d03fbf9dfad88ac08a75eec5f0f6c (diff)
downloadbcm5719-llvm-c0db07299ed9cdc0383130b3c98391a2a62f0d46.tar.gz
bcm5719-llvm-c0db07299ed9cdc0383130b3c98391a2a62f0d46.zip
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
Diffstat (limited to 'libcxx/include/memory')
-rw-r--r--libcxx/include/memory5
1 files changed, 5 insertions, 0 deletions
diff --git a/libcxx/include/memory b/libcxx/include/memory
index 2d9d75f99e5..bc5c4c65383 100644
--- a/libcxx/include/memory
+++ b/libcxx/include/memory
@@ -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>
OpenPOWER on IntegriCloud