Author: marshall Date: Wed Apr 13 12:02:23 2016 New Revision: 266209 URL: http://llvm.org/viewvc/llvm-project?rev=266209&view=rev Log: Qualify calls to addressof to avoid getting ADL. Fixes PR#27254.
Modified: libcxx/trunk/include/__mutex_base libcxx/trunk/include/shared_mutex Modified: libcxx/trunk/include/__mutex_base URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__mutex_base?rev=266209&r1=266208&r2=266209&view=diff ============================================================================== --- libcxx/trunk/include/__mutex_base (original) +++ libcxx/trunk/include/__mutex_base Wed Apr 13 12:02:23 2016 @@ -117,24 +117,24 @@ public: unique_lock() _NOEXCEPT : __m_(nullptr), __owns_(false) {} _LIBCPP_INLINE_VISIBILITY explicit unique_lock(mutex_type& __m) - : __m_(addressof(__m)), __owns_(true) {__m_->lock();} + : __m_(_VSTD::addressof(__m)), __owns_(true) {__m_->lock();} _LIBCPP_INLINE_VISIBILITY unique_lock(mutex_type& __m, defer_lock_t) _NOEXCEPT - : __m_(addressof(__m)), __owns_(false) {} + : __m_(_VSTD::addressof(__m)), __owns_(false) {} _LIBCPP_INLINE_VISIBILITY unique_lock(mutex_type& __m, try_to_lock_t) - : __m_(addressof(__m)), __owns_(__m.try_lock()) {} + : __m_(_VSTD::addressof(__m)), __owns_(__m.try_lock()) {} _LIBCPP_INLINE_VISIBILITY unique_lock(mutex_type& __m, adopt_lock_t) - : __m_(addressof(__m)), __owns_(true) {} + : __m_(_VSTD::addressof(__m)), __owns_(true) {} template <class _Clock, class _Duration> _LIBCPP_INLINE_VISIBILITY unique_lock(mutex_type& __m, const chrono::time_point<_Clock, _Duration>& __t) - : __m_(addressof(__m)), __owns_(__m.try_lock_until(__t)) {} + : __m_(_VSTD::addressof(__m)), __owns_(__m.try_lock_until(__t)) {} template <class _Rep, class _Period> _LIBCPP_INLINE_VISIBILITY unique_lock(mutex_type& __m, const chrono::duration<_Rep, _Period>& __d) - : __m_(addressof(__m)), __owns_(__m.try_lock_for(__d)) {} + : __m_(_VSTD::addressof(__m)), __owns_(__m.try_lock_for(__d)) {} _LIBCPP_INLINE_VISIBILITY ~unique_lock() { Modified: libcxx/trunk/include/shared_mutex URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/shared_mutex?rev=266209&r1=266208&r2=266209&view=diff ============================================================================== --- libcxx/trunk/include/shared_mutex (original) +++ libcxx/trunk/include/shared_mutex Wed Apr 13 12:02:23 2016 @@ -319,25 +319,25 @@ public: _LIBCPP_INLINE_VISIBILITY explicit shared_lock(mutex_type& __m) - : __m_(addressof(__m)), + : __m_(_VSTD::addressof(__m)), __owns_(true) {__m_->lock_shared();} _LIBCPP_INLINE_VISIBILITY shared_lock(mutex_type& __m, defer_lock_t) _NOEXCEPT - : __m_(addressof(__m)), + : __m_(_VSTD::addressof(__m)), __owns_(false) {} _LIBCPP_INLINE_VISIBILITY shared_lock(mutex_type& __m, try_to_lock_t) - : __m_(addressof(__m)), + : __m_(_VSTD::addressof(__m)), __owns_(__m.try_lock_shared()) {} _LIBCPP_INLINE_VISIBILITY shared_lock(mutex_type& __m, adopt_lock_t) - : __m_(addressof(__m)), + : __m_(_VSTD::addressof(__m)), __owns_(true) {} @@ -345,7 +345,7 @@ public: _LIBCPP_INLINE_VISIBILITY shared_lock(mutex_type& __m, const chrono::time_point<_Clock, _Duration>& __abs_time) - : __m_(addressof(__m)), + : __m_(_VSTD::addressof(__m)), __owns_(__m.try_lock_shared_until(__abs_time)) {} @@ -353,7 +353,7 @@ public: _LIBCPP_INLINE_VISIBILITY shared_lock(mutex_type& __m, const chrono::duration<_Rep, _Period>& __rel_time) - : __m_(addressof(__m)), + : __m_(_VSTD::addressof(__m)), __owns_(__m.try_lock_shared_for(__rel_time)) {} _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits