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:
@@ -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:
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user