Fix Void flatbuffers serialization

Before this fix, the encoding of Void happens to 'work' in that this
implementation can both read and write it, but it is not a flatbuffers
message since it contains a invalid offset (the implementation 'works'
because it does not dereference that offset).
This commit is contained in:
Andrew Noyes 2019-07-25 13:40:54 -07:00 committed by Alex Miller
parent 9afd162e2f
commit fc7f9e7c69
1 changed files with 3 additions and 1 deletions

View File

@ -123,7 +123,9 @@ class Void {
public:
constexpr static FileIdentifier file_identifier = 2010442;
template <class Ar>
void serialize(Ar&) {}
void serialize(Ar& ar) {
serializer(ar);
}
};
class Never {};