aboutsummaryrefslogtreecommitdiff
path: root/odb/semantics
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-06-04 16:27:35 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-06-04 16:27:35 +0200
commit633f9c5ac574750799efdfe5d1eb31db40a267da (patch)
tree22a579a5e476f7f6ad0cec0d2d39a9247d559ac7 /odb/semantics
parent05216e9cbe22690ec45f0ca2665d3b1ee7dedb55 (diff)
Make nameable::fq_name virtual
Override it for fundamental type to do the right thing.
Diffstat (limited to 'odb/semantics')
-rw-r--r--odb/semantics/elements.hxx2
-rw-r--r--odb/semantics/fundamental.cxx6
-rw-r--r--odb/semantics/fundamental.hxx5
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) {}