Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Problems with parser

Andrew Niefer wrote:

I did fix a defect related to classes inheriting from template parameters
(71410), the fix is in head and the 2.0.1 stream.

In general we have problems  with code patterns that contain assumptions
about what a template parameter is before we actually instantiate the
template (60307).
      template < class T > class B {
          typedef typename T::myInt int_type;
This compiles as long as you instantiate the template with something that
contains a myInt.

Granted, but what do you do in case a default parameter is provided?

I have lots of templates following some sort of policy based design. I have classes which inherit from a class provided from a template parameter. I do have defaults for these parameters, but to me it looks like cdt can't / won't take that into account when parsing these templates.

I know, its impossible to know what to do in the source of this "upper" class since you cannot know what it will inherit from when its instantiated, but I do provide defaults ..

Aw, I'll give this 2.0.1 version a try, is there a way to get it through the online update?

kind regards Philip

Back to the top