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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user