diff --git a/include/rfl/avro/Parser.hpp b/include/rfl/avro/Parser.hpp index c638a232..c30c63ad 100644 --- a/include/rfl/avro/Parser.hpp +++ b/include/rfl/avro/Parser.hpp @@ -3,6 +3,7 @@ #include "../Generic.hpp" #include "../Tuple.hpp" +#include "../always_false.hpp" #include "../parsing/Parser.hpp" #include "Reader.hpp" #include "Writer.hpp" @@ -46,19 +47,20 @@ template struct Parser { using InputVarType = typename avro::Reader::InputVarType; - static Result read(const avro::Reader &, - const InputVarType &) noexcept { - static_assert(false, "Generics are unsupported in Avro."); + template + static Result read(const avro::Reader &, const T &) noexcept { + static_assert(always_false_v, "Generics are unsupported in Avro."); return Error("Unsupported"); } template static void write(const avro::Writer &, const Generic &, const P &) noexcept { - static_assert(false, "Generics are unsupported in Avro."); + static_assert(always_false_v

, "Generics are unsupported in Avro."); } - static schema::Type to_schema(std::map *) { - static_assert(false, "Generics are unsupported in Avro."); + template + static schema::Type to_schema(T *) { + static_assert(always_false_v, "Generics are unsupported in Avro."); return schema::Type{}; } };