mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-01 04:26:48 +00:00
sstables: convert parse() for a self-describing type to concept
This parse() overload uses "not integral and not enum" to reject non-self-describing types. Express it directly with the self_describing concept instead.
This commit is contained in:
@@ -267,8 +267,8 @@ future<> parse(const schema& s, sstable_version_types v, random_access_reader& i
|
||||
}
|
||||
|
||||
// Intended to be used for a type that describes itself through describe_type().
|
||||
template <class T>
|
||||
typename std::enable_if_t<!std::is_integral<T>::value && !std::is_enum<T>::value, future<>>
|
||||
template <self_describing T>
|
||||
future<>
|
||||
parse(const schema& s, sstable_version_types v, random_access_reader& in, T& t) {
|
||||
return t.describe_type(v, [v, &s, &in] (auto&&... what) -> future<> {
|
||||
return parse(s, v, in, what...);
|
||||
|
||||
Reference in New Issue
Block a user