diff --git a/libcxx/include/memory b/libcxx/include/memory index b03ded932795..662faa0a74ff 100644 --- a/libcxx/include/memory +++ b/libcxx/include/memory @@ -3660,7 +3660,7 @@ template 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 diff --git a/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/test_deleter.h b/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/test_deleter.h index 7af7468807e4..0263061b3a84 100644 --- a/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/test_deleter.h +++ b/libcxx/test/utilities/memory/util.smartptr/util.smartptr.shared/test_deleter.h @@ -19,6 +19,12 @@ #include #include +#ifndef _LIBCPP_HAS_NO_DELETED_FUNCTIONS +#define DELETE_FUNCTION = delete +#else +#define DELETE_FUNCTION { assert(false); } +#endif + struct test_deleter_base { static int count; @@ -46,6 +52,8 @@ public: void set_state(int i) {state_ = i;} void operator()(T* p) {assert(state_ >= 0); ++dealloc_count; delete p;} + + test_deleter* operator&() const DELETE_FUNCTION; }; template diff --git a/libcxx/www/cxx1z_status.html b/libcxx/www/cxx1z_status.html index 1429de0c08ae..b6ddc1082574 100644 --- a/libcxx/www/cxx1z_status.html +++ b/libcxx/www/cxx1z_status.html @@ -76,9 +76,9 @@ 2377std::align requirements overly strictUrbana 2396underlying_type doesn't say what to do for an incomplete enumeration typeUrbana 2399shared_ptr 's constructor from unique_ptr should be constrainedUrbana - 2400shared_ptr 's get_deleter() should use addressof()Urbana + 2400shared_ptr 's get_deleter() should use addressof()UrbanaComplete 2401std::function needs more noexceptUrbana - 2404mismatch() 's complexity needs to be updatedUrbana + 2404mismatch() 's complexity needs to be updatedUrbanaComplete 2408SFINAE-friendly common_type / iterator_traits is missing in C++14Urbana