Author Topic: refactoring parser issues.  (Read 3466 times)

keegi

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
refactoring parser issues.
« on: August 31, 2006, 02:18:15 pm »
Hello!

I am using SlickEdit 10.0.3 and having problems using refactoring in my project.

Problem 1: mutable keyword.

This does not parse:
Code: [Select]
class A {void method(void);};

class B {
mutable A a;
void mm(void){ a.method();}
};
-------------------------------------
mutable.cpp(5,5): error -8076: 'method' is not a member of 'A'

Problem 2: friend template
Code: [Select]
template<class T> class A{};
class B {
  friend class A;
};
-------------------------------------------
friend.cpp(3,15): error -8041: symbol 'A' is already defined
friend.cpp(1,19): error -8018: see previous definition of 'A'

keegi

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Re: refactoring parser issues.
« Reply #1 on: August 31, 2006, 02:33:55 pm »
Problem 3: inline friend method
Code: [Select]
class X {
int v;
inline bool method(const X &x1, const X &x2) const {
return x1 == x2;
}
friend inline bool operator==(const X &x1, const X &x2){
return x1.v == x2.v;
}
};
--------------------------------------------
inline.cpp(4,13): error -8023: no '==' operator defined which matches the operands

meanwhile I already found that "Problem 2" could be worked around by specifying friend as:
Code: [Select]
class B{
  template<class> friend class A;
};

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2791
  • Hero Points: 422
Re: refactoring parser issues.
« Reply #2 on: September 08, 2006, 04:03:47 pm »
Thanks for the test cases.  I have logged these defects, already knew about a couple of them...  These problems will be corrected in the next release of SlickEdit (12.0).