Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constexpr next #789

Merged
merged 23 commits into from
Jun 29, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add c++17esque overloads to traits
mborland committed Jun 25, 2022
commit 340631bb92c787f649356eadd23619e9bd62131a
10 changes: 10 additions & 0 deletions include/boost/math/tools/traits.hpp
Original file line number Diff line number Diff line change
@@ -53,6 +53,16 @@ BOOST_MATH_HAS_NAMED_TRAIT(has_value_type, value_type)
BOOST_MATH_HAS_NAMED_TRAIT(has_policy_type, policy_type)
BOOST_MATH_HAS_NAMED_TRAIT(has_backend_type, backend_type)

// C++17-esque helpers
template <typename T>
constexpr bool has_value_type_v = has_value_type<T>::value;

template <typename T>
constexpr bool has_policy_type_v = has_policy_type<T>::value;

template <typename T>
constexpr bool has_backend_type_v = has_backend_type<T>::value;

template <typename D>
char cdf(const D& ...);
template <typename D>