SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: alex on September 15, 2006, 03:13:37 pm

Title: C++ Refactoring Parser
Post by: alex on September 15, 2006, 03:13:37 pm
Are there plans for improved template parsing support in the refactoring parser?  Right now, code such as

template <class T, class U>
struct Typelist {
  typedef T Head;
  typedef U Tail;
};

 template <class TList, unsigned int index> struct TypeAt;
       
  template <class Head, class Tail>
  struct TypeAt<Typelist<Head, Tail>, 0>
  {
    typedef Head Result;
  };

  template <class Head, class Tail, unsigned int i>
  struct TypeAt<Typelist<Head, Tail>, i>
  {
    typedef typename TypeAt<Tail, i - 1>::Result Result;
  };

fails with the error "error -8076: 'Result' is not a member of 'TypeAt<Typelist<@T0, @T1>, unsigned int>'"

while code using this compiles just fine.
Title: Re: C++ Refactoring Parser
Post by: Dennis on September 18, 2006, 02:00:39 pm
Ugh.  Template meta-programming.  Thanks for the example.  I will add a report to our defect tracking system.  We are making significant improvements to the refactoring parser for the next release of SlickEdit, so there is a good chance that even this nasty stuff will be handled in the next version.