From 2b4e2922ae094ad3e2e110e2532ef99ed5ac727b Mon Sep 17 00:00:00 2001 From: denzor200 Date: Fri, 16 Dec 2022 19:57:12 +0400 Subject: [PATCH] fix for sfinae-friendliness issue --- include/boost/pfr/traits.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/boost/pfr/traits.hpp b/include/boost/pfr/traits.hpp index 71bb419..e8515fa 100644 --- a/include/boost/pfr/traits.hpp +++ b/include/boost/pfr/traits.hpp @@ -36,15 +36,16 @@ namespace boost { namespace pfr { template struct is_reflectable { /* do not has 'value' because value is unknown */ }; -// TODO: need tests to show that these specs are sfinae-friendly +// these specs can't be inherited from 'std::integral_constant< bool, boost::pfr::is_reflectable::value >', +// because it will break the sfinae-friendliness template -struct is_reflectable : std::integral_constant< bool, boost::pfr::is_reflectable::value > {}; +struct is_reflectable : boost::pfr::is_reflectable {}; template -struct is_reflectable : std::integral_constant< bool, boost::pfr::is_reflectable::value > {}; +struct is_reflectable : boost::pfr::is_reflectable {}; template -struct is_reflectable : std::integral_constant< bool, boost::pfr::is_reflectable::value > {}; +struct is_reflectable : boost::pfr::is_reflectable {}; #if BOOST_PFR_ENABLE_IMPLICITLY_REFLECTION /// Checks the input type for the potential to be reflected.