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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324911 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2018-02-12 17:26:40 +00:00
parent b8cb776511
commit f72f21907c
2 changed files with 8 additions and 3 deletions

View File

@@ -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>