From 6c5e6d64776a1d5f80de72f3d70c33476dc75c5c Mon Sep 17 00:00:00 2001 From: Simon Brand Date: Mon, 3 Sep 2018 14:30:07 +0100 Subject: [PATCH] More Clang fixes --- tl/optional.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tl/optional.hpp b/tl/optional.hpp index 485b416..9295d72 100644 --- a/tl/optional.hpp +++ b/tl/optional.hpp @@ -142,7 +142,7 @@ struct conjunction #if defined(_LIBCPP_VERSION) && __cplusplus == 201103L #define TL_OPTIONAL_LIBCXX_MEM_FN_WORKAROUND #endif - + // In C++11 mode, there's an issue in libc++'s std::mem_fn // which results in a hard-error when using it in a noexcept expression // in some cases. This is a check to workaround the common failing case. @@ -161,8 +161,9 @@ struct is_pointer_to_non_const_member_func : std template struct is_pointer_to_non_const_member_func : std::true_type{}; -template struct is_ref_to_const : std::false_type{}; -template struct is_ref_to_const : std::true_type{}; +template struct is_const_or_const_ref : std::false_type{}; +template struct is_const_or_const_ref : std::true_type{}; +template struct is_const_or_const_ref : std::true_type{}; #endif // std::invoke from C++17 @@ -170,7 +171,7 @@ template struct is_ref_to_const : std::true_type{}; template ::value - && is_ref_to_const::value)>, + && is_const_or_const_ref::value)>, #endif typename = enable_if_t>{}>, int = 0>