diff options
Diffstat (limited to 'odb/semantics/elements.cxx')
-rw-r--r-- | odb/semantics/elements.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/odb/semantics/elements.cxx b/odb/semantics/elements.cxx index 21e3260..43fb379 100644 --- a/odb/semantics/elements.cxx +++ b/odb/semantics/elements.cxx @@ -48,6 +48,23 @@ namespace semantics // bool nameable:: + in_scope (scope_type& s) + { + for (scope_type* p (&scope ());; p = &p->scope_ ()) + { + //@@ Need to handle namespace extensions. + // + if (p == &s) + return true; + + if (p->global_scope ()) + break; + } + + return false; + } + + bool nameable:: anonymous_ () const { tree n (tree_node ()); |