diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-06-04 16:27:35 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-06-04 16:27:35 +0200 |
commit | 633f9c5ac574750799efdfe5d1eb31db40a267da (patch) | |
tree | 22a579a5e476f7f6ad0cec0d2d39a9247d559ac7 | |
parent | 05216e9cbe22690ec45f0ca2665d3b1ee7dedb55 (diff) |
Make nameable::fq_name virtual
Override it for fundamental type to do the right thing.
-rw-r--r-- | odb/semantics/elements.hxx | 2 | ||||
-rw-r--r-- | odb/semantics/fundamental.cxx | 6 | ||||
-rw-r--r-- | odb/semantics/fundamental.hxx | 5 |
3 files changed, 11 insertions, 2 deletions
diff --git a/odb/semantics/elements.hxx b/odb/semantics/elements.hxx index 3c98db8..8d9a379 100644 --- a/odb/semantics/elements.hxx +++ b/odb/semantics/elements.hxx @@ -282,7 +282,7 @@ namespace semantics return named ().name (); } - string + virtual string fq_name () const; scope_type& diff --git a/odb/semantics/fundamental.cxx b/odb/semantics/fundamental.cxx index 10074a5..7da222d 100644 --- a/odb/semantics/fundamental.cxx +++ b/odb/semantics/fundamental.cxx @@ -8,6 +8,12 @@ namespace semantics { + string fund_type:: + fq_name () const + { + return name (); + } + // type info // namespace diff --git a/odb/semantics/fundamental.hxx b/odb/semantics/fundamental.hxx index 5cee2ac..cd68688 100644 --- a/odb/semantics/fundamental.hxx +++ b/odb/semantics/fundamental.hxx @@ -14,8 +14,11 @@ namespace semantics // Fundamental C++ types. // - class fund_type: public type + struct fund_type: public type { + virtual string + fq_name () const; + protected: fund_type (tree tn) : type (tn) {} |