29 #ifndef PIRANHA_KEY_IS_MULTIPLIABLE_HPP 30 #define PIRANHA_KEY_IS_MULTIPLIABLE_HPP 34 #include <type_traits> 37 #include <piranha/is_cf.hpp> 38 #include <piranha/is_key.hpp> 39 #include <piranha/symbol_utils.hpp> 40 #include <piranha/term.hpp> 49 template <
typename Cf,
typename Key,
typename =
void>
50 struct key_is_multipliable_impl : std::false_type {
53 template <
typename Cf,
typename Key>
54 struct key_is_multipliable_impl<Cf, Key,
55 enable_if_t<
std::is_same<const std::size_t, decltype(Key::multiply_arity)>::value
56 && (Key::multiply_arity > 0u)>> {
57 template <
typename Cf1,
typename Key1>
59 = decltype(Key1::multiply(std::declval<std::array<term<Cf1, Key1>, Key1::multiply_arity> &>(),
60 std::declval<
const term<Cf1, Key1> &>(), std::declval<
const term<Cf1, Key1> &>(),
61 std::declval<const symbol_fset &>()));
62 static const bool value = is_detected<multiply_t, Cf, Key>::value;
79 template <
typename Cf,
typename Key>
82 PIRANHA_TT_CHECK(
is_cf, uncvref_t<Cf>);
83 PIRANHA_TT_CHECK(
is_key, uncvref_t<Key>);
84 static const bool implementation_defined = key_is_multipliable_impl<uncvref_t<Cf>, uncvref_t<Key>>
::value;
88 static const bool value = implementation_defined;
91 template <
typename Cf,
typename Key>
Type trait for multipliable key.
static const bool value
Value of the type trait.
Type trait to detect coefficient types.