aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/eolian_cxx/grammar/eo_class_generator.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/eolian_cxx/grammar/eo_class_generator.hh')
-rw-r--r--src/lib/eolian_cxx/grammar/eo_class_generator.hh5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/eolian_cxx/grammar/eo_class_generator.hh b/src/lib/eolian_cxx/grammar/eo_class_generator.hh
index 2b2233bdb7..656a791198 100644
--- a/src/lib/eolian_cxx/grammar/eo_class_generator.hh
+++ b/src/lib/eolian_cxx/grammar/eo_class_generator.hh
@@ -46,7 +46,10 @@ eo_class_generator(std::ostream& out, eo_class const& cls)
<< eo_class_getter(cls)
<< "private:" << endl
<< eo_class_constructors(cls)
- << "};" << endl;
+ << "};" << endl
+ << "static_assert(sizeof(" << cls.name << ") == sizeof(Eo*), \"sizeof(" << cls.name << ") != sizeof(Eo*)\");" << endl
+ << "static_assert(std::is_standard_layout<" << cls.name << ">::value, \"'" << cls.name << "' is not standard layout\");"
+ << endl << endl;
}
} } } // namespace efl { namespace eolian { namespace grammar {