Commit 948f2f8c authored by Dominik Charousset's avatar Dominik Charousset

Remove obsolete concept

parent 88a78a43
......@@ -37,8 +37,6 @@ struct default_sum_type_access {
static constexpr bool specialized = true;
static constexpr bool immutable = false;
template <class U, int Pos>
static bool is(const T& x, sum_type_token<U, Pos> token) {
return x.get_data().is(token.pos);
......
......@@ -32,13 +32,6 @@ constexpr bool SumType() {
return has_sum_type_access<typename std::decay<T>::type>::value;
}
/// Concept for checking whether `T` supports the sum type API by specializing
/// `sum_type_access` and grants non-const element access.
template <class T>
constexpr bool MutableSumType() {
return has_mutable_sum_type_access<typename std::decay<T>::type>::value;
}
/// Concept for checking whether all `Ts` support the sum type API by
/// specializing `sum_type_access`.
template <class... Ts>
......
......@@ -28,7 +28,6 @@ namespace caf {
template <class T>
struct sum_type_access {
static constexpr bool specialized = false;
static constexpr bool immutable = false;
};
/// Evaluates to `true` if `T` specializes `sum_type_access`.
......@@ -38,13 +37,4 @@ struct has_sum_type_access {
static constexpr bool value = sum_type_access<T>::specialized;
};
/// Evaluates to `true` if `T` specializes `sum_type_access` and allows
/// non-const element access.
/// @relates SumType
template <class T>
struct has_mutable_sum_type_access {
static constexpr bool value = sum_type_access<T>::specialized
&& !sum_type_access<T>::immutable;
};
} // namespace caf
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment