2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-19 04:22:09 +00:00

Strip cv ref t from is_policy and add C++17-esque overload

This commit is contained in:
Matt Borland
2025-09-09 08:28:36 +02:00
parent 669557e79d
commit 083051164a

View File

@@ -942,7 +942,7 @@ template <typename P>
class is_policy_imp
{
public:
static constexpr bool value = (sizeof(::boost::math::policies::detail::test_is_policy(static_cast<P*>(nullptr))) == sizeof(char));
static constexpr bool value = (sizeof(detail::test_is_policy(static_cast<boost::math::remove_reference_t<boost::math::remove_cv_t<P>>*>(nullptr))) == sizeof(char));
};
}
@@ -955,6 +955,9 @@ public:
using type = boost::math::integral_constant<bool, value>;
};
template <typename T>
BOOST_MATH_INLINE_CONSTEXPR bool is_policy_v = is_policy<T>::value;
//
// Helper traits class for distribution error handling:
//