diff options
-rw-r--r-- | odb/processor.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/odb/processor.cxx b/odb/processor.cxx index 0a6d753..f401d3f 100644 --- a/odb/processor.cxx +++ b/odb/processor.cxx @@ -969,7 +969,8 @@ namespace // The wrapped_type alias is a typedef in an instantiation // that we just instantiated dynamically. As a result there // is no semantic graph edges corresponding to this typedef - // since we haven't parsed it yet. So to get the tree node + // since we haven't parsed it yet (unless it was instantiated + // explicitly by the user; see below). So to get the tree node // that can actually be resolved to the graph node, we use // the source type of this typedef. // @@ -1011,8 +1012,15 @@ namespace // Find the hint. // + // If we can't find any, then try to fallback to the wrapped_type + // alias inside wrapper_traits. This requires an explicit + // wrapper_traits instantiation (see above). + // semantics::names* wh (find_hint (unit, decl)); + if (wh == nullptr) + wh = unit.find_hint (TREE_TYPE (decl)); + t.set ("wrapper-type", wt); t.set ("wrapper-hint", wh); } |