From bc42aee7c1af76c14cf4430686ea6c41cdcddd56 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Thu, 18 Mar 2021 18:47:00 +0200 Subject: [PATCH] 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. --- sstables/sstables.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sstables/sstables.cc b/sstables/sstables.cc index 1f629bd5c5..6f044e31f7 100644 --- a/sstables/sstables.cc +++ b/sstables/sstables.cc @@ -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 -typename std::enable_if_t::value && !std::is_enum::value, future<>> +template +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...);