From 6153eebc42b07d80afb9d3f90b959361681cfe06 Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Sun, 11 Jun 2017 10:17:35 -0400 Subject: [PATCH] Slightly more succint sfinae expressions --- include/boost/core/addressof.hpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/include/boost/core/addressof.hpp b/include/boost/core/addressof.hpp index b73ea56..733a606 100644 --- a/include/boost/core/addressof.hpp +++ b/include/boost/core/addressof.hpp @@ -172,19 +172,14 @@ namespace detail { template T addressof_declval() BOOST_NOEXCEPT; -template -struct addressof_void { - typedef void type; -}; - template struct addressof_member_operator { static constexpr bool value = false; }; template -struct addressof_member_operator().operator&())>::type> { +struct addressof_member_operator().operator&(), void())> { static constexpr bool value = true; }; @@ -201,8 +196,8 @@ struct addressof_non_member_operator { }; template -struct addressof_non_member_operator()))>::type> { +struct addressof_non_member_operator()), void())> { static constexpr bool value = true; }; @@ -213,7 +208,7 @@ struct addressof_expression { template struct addressof_expression())>::type> { + decltype(&addressof_declval(), void())> { static constexpr bool value = true; };