From 01f77f6d38283b4efbe2b55fc9c7c837fd6498dc Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 25 Mar 2010 13:47:43 +0200 Subject: Add support for union, enum, class/union template --- odb/semantics/union-template.cxx | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 odb/semantics/union-template.cxx (limited to 'odb/semantics/union-template.cxx') diff --git a/odb/semantics/union-template.cxx b/odb/semantics/union-template.cxx new file mode 100644 index 0000000..a83748f --- /dev/null +++ b/odb/semantics/union-template.cxx @@ -0,0 +1,42 @@ +// file : odb/semantics/union-template.cxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#include + +#include + +namespace semantics +{ + // type info + // + namespace + { + struct init + { + init () + { + using compiler::type_info; + + // union_template + // + { + type_info ti (typeid (union_template)); + ti.add_base (typeid (type_template)); + ti.add_base (typeid (scope)); + insert (ti); + } + + // union_instantiation + // + { + type_info ti (typeid (union_instantiation)); + ti.add_base (typeid (union_)); + ti.add_base (typeid (type_instantiation)); + insert (ti); + } + } + } init_; + } +} -- cgit v1.1