Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Need info on CPPUnknownClass


The Unknown bindings are used in templates when we do not have enough information to resolve a binding without instantiating the template.  When you are working with bindings in the template definition itself, we have no template instance and can't say much about these bindings.

        template <class T> class A {
              typedef typename T::X _xx;
           _xx s;
        };

Without instantiating the template, we have no idea what T is, and therefore have no information about X either.  I don't remember all the details, but I would expect that X would be a CPPUnknownClass, its parent scope would be a CPPUnknownScope associated with T.  There would also likely be a CPPUnknownScope for X in case someone did "s.a".

See AST2TemplateTests.testTemplateParameterQualifiedType_1 for a larger extension of this example.

As for the PDOM, I would expect that the support there is simply incomplete.  As Bryan found when he started the PDOM template work, even the pure bindings without PDOM is not complete when it comes to templates (see for example bug 177418).

-Andrew

cdt-dev-bounces@xxxxxxxxxxx wrote on 01/06/2008 01:33:26 AM:

> Hi Andrew, Bryan and Doug,
> For understanding issues related to bug 214017 I need background
> information on ICPPInternalUnknown, CPPUnknownClass, CPPUnknownScope
> and few related classes.

> 1. What do CPPUnknownClass and CPPUnknownScope classes represent?
> What is the basic idea behind them? What purpose do they serve?

> 2. Why are there no PDOM equivalents? Should they be added?
> 3. Why does CPPTemplateTypeParameter implement ICPPInternalUnknown,
> but PDOMCPPTemplateTypeParameter does not?

> 4. Why doesn't CPPTemplateTemplateParameter have a PDOM equivalent?
> Should it be added?

> Any insight will be highly appreciated.
>
> -sergey_______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev

Back to the top