|
3 | 3 |
|
4 | 4 | #include "../Generic.hpp"
|
5 | 5 | #include "../Tuple.hpp"
|
| 6 | +#include "../always_false.hpp" |
6 | 7 | #include "../parsing/Parser.hpp"
|
7 | 8 | #include "Reader.hpp"
|
8 | 9 | #include "Writer.hpp"
|
@@ -46,19 +47,20 @@ template <class ProcessorsType>
|
46 | 47 | struct Parser<avro::Reader, avro::Writer, Generic, ProcessorsType> {
|
47 | 48 | using InputVarType = typename avro::Reader::InputVarType;
|
48 | 49 |
|
49 |
| - static Result<Generic> read(const avro::Reader &, |
50 |
| - const InputVarType &) noexcept { |
51 |
| - static_assert(false, "Generics are unsupported in Avro."); |
| 50 | + template <class T> |
| 51 | + static Result<Generic> read(const avro::Reader &, const T &) noexcept { |
| 52 | + static_assert(always_false_v<T>, "Generics are unsupported in Avro."); |
52 | 53 | return Error("Unsupported");
|
53 | 54 | }
|
54 | 55 |
|
55 | 56 | template <class P>
|
56 | 57 | static void write(const avro::Writer &, const Generic &, const P &) noexcept {
|
57 |
| - static_assert(false, "Generics are unsupported in Avro."); |
| 58 | + static_assert(always_false_v<P>, "Generics are unsupported in Avro."); |
58 | 59 | }
|
59 | 60 |
|
60 |
| - static schema::Type to_schema(std::map<std::string, schema::Type> *) { |
61 |
| - static_assert(false, "Generics are unsupported in Avro."); |
| 61 | + template <class T> |
| 62 | + static schema::Type to_schema(T *) { |
| 63 | + static_assert(always_false_v<T>, "Generics are unsupported in Avro."); |
62 | 64 | return schema::Type{};
|
63 | 65 | }
|
64 | 66 | };
|
|
0 commit comments