diff options
Diffstat (limited to 'odb/context.cxx')
-rw-r--r-- | odb/context.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/odb/context.cxx b/odb/context.cxx index 4daa896..1e5c6c2 100644 --- a/odb/context.cxx +++ b/odb/context.cxx @@ -1493,15 +1493,17 @@ string context:: type_ref_type (semantics::type& t, semantics::names* hint, bool mc, - string const& var) + string const& var, + bool decay) { using semantics::array; string r; // Note that trailing const syntax is used for a reason (consider - // t == const foo*). We also have to decay top-level arrays. + // t == const foo*). We may also have to decay then top-level array. // - if (array* a = dynamic_cast<array*> (&utype (t))) + array* a; + if (decay && (a = dynamic_cast<array*> (&utype (t))) != 0) { semantics::type& bt (a->base_type ()); hint = a->contains ().hint (); |