From f043a45fd21bab906cafc8964a892a64def65ec9 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 14 May 2016 10:59:18 +0800 Subject: Remove requirement for all variants of tagged unions to be empty-constructable --- src/ast/path.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ast/path.cpp') diff --git a/src/ast/path.cpp b/src/ast/path.cpp index 484ac7b7..fb1e60cf 100644 --- a/src/ast/path.cpp +++ b/src/ast/path.cpp @@ -551,7 +551,7 @@ void operator%(::Deserialiser& s, Path::Class::Tag& c) { s.item(n); c = Path::Class::tag_from_str(n); } -#define _D(VAR, ...) case Class::TAG_##VAR: { m_class = Class::make_null_##VAR(); auto& ent = m_class.as_##VAR(); (void)&ent; __VA_ARGS__ } break; +#define _D(VAR, ...) case Class::TAG_##VAR: { m_class = Class::make_##VAR({}); auto& ent = m_class.as_##VAR(); (void)&ent; __VA_ARGS__ } break; ::std::unique_ptr Path::from_deserialiser(Deserialiser& s) { Path p; s.item(p); -- cgit v1.2.3