Implement LWG2400 - 'shared_ptr's get_deleter() should use addressof()', and add tests. Mark LWG2400 and LWG2404 as complete

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@222161 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2014-11-17 19:05:50 +00:00
parent 36628eb77a
commit 4b3ca8c249
3 changed files with 11 additions and 3 deletions

View File

@@ -3660,7 +3660,7 @@ template <class _Tp, class _Dp, class _Alloc>
const void*
__shared_ptr_pointer<_Tp, _Dp, _Alloc>::__get_deleter(const type_info& __t) const _NOEXCEPT
{
return __t == typeid(_Dp) ? &__data_.first().second() : 0;
return __t == typeid(_Dp) ? _VSTD::addressof(__data_.first().second()) : 0;
}
#endif // _LIBCPP_NO_RTTI