Author Topic: C++ Refactoring Parser  (Read 4294 times)

alex

  • Community Member
  • Posts: 64
  • Hero Points: 6
C++ Refactoring Parser
« 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.

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: C++ Refactoring Parser
« Reply #1 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.