From: Yedidya Feldblum Date: Wed, 20 Dec 2017 06:31:53 +0000 (-0800) Subject: Fix Build: propagate_const under GCC X-Git-Tag: v2017.12.25.00~9 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=1166fe0e3deb1548ef173f8952fc8fd7225ee8fd;p=folly.git Fix Build: propagate_const under GCC Summary: [Folly] Fix Build: `propagate_const` under GCC. Reviewed By: aary Differential Revision: D6609722 fbshipit-source-id: 47d8b0f2d54e0e5834383ea64c93af30927c921d --- diff --git a/folly/lang/PropagateConst.h b/folly/lang/PropagateConst.h index 5b359dc7..235db85a 100644 --- a/folly/lang/PropagateConst.h +++ b/folly/lang/PropagateConst.h @@ -126,8 +126,10 @@ class propagate_const { pointer_ = static_cast(other); } - FOLLY_CPP14_CONSTEXPR void swap(propagate_const& other) noexcept(noexcept( - detail::propagate_const_adl::adl_swap(pointer_, other.pointer_))) { + FOLLY_CPP14_CONSTEXPR void swap(propagate_const& other) noexcept( + noexcept(detail::propagate_const_adl::adl_swap( + std::declval(), + other.pointer_))) { detail::propagate_const_adl::adl_swap(pointer_, other.pointer_); }