From 1166fe0e3deb1548ef173f8952fc8fd7225ee8fd Mon Sep 17 00:00:00 2001 From: Yedidya Feldblum Date: Tue, 19 Dec 2017 22:31:53 -0800 Subject: [PATCH] Fix Build: propagate_const under GCC Summary: [Folly] Fix Build: `propagate_const` under GCC. Reviewed By: aary Differential Revision: D6609722 fbshipit-source-id: 47d8b0f2d54e0e5834383ea64c93af30927c921d --- folly/lang/PropagateConst.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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_); } -- 2.34.1