SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: keegi on August 31, 2006, 02:18:15 PM

Title: refactoring parser issues.
Post by: keegi 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'
Title: Re: refactoring parser issues.
Post by: keegi 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;
};
Title: Re: refactoring parser issues.
Post by: Dennis 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).