Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » CDT and friends(code analysis not detecting type for 'friend' members)
CDT and friends [message #1062427] Fri, 07 June 2013 15:45
laurent bla is currently offline laurent blaFriend
Messages: 1
Registered: June 2013
Junior Member
Hello everyone!

I bore with it for some time now but I'd like to know if I can have it working properly: the code analysis is showing dozens of errors, as each member declared as 'friend' is then not recognized for its real type. English is not my mother-tongue so to be sure there is no misinterpretation, I'll put an example:

in my code I have:
cout<<Norm(Diam(Row(Box,i)))<<endl;

I'm using the Bias/Profil libraries, and the definition of the members/vars are:
Box is declared as INTERVAL_MATRIX,
Row as "friend INTERVAL_VECTOR Row (INTERVAL_MATRIX &, INT)",
Diam is overloaded but the definition of interest here is: "friend VECTOR Diam (INTERVAL_VECTOR &)",
Norm, same thing, and the interesting def is: "friend INTERVAL Norm (INTERVAL_VECTOR &)",
and the operator<< as "friend ostream & operator << (ostream &, INTERVAL &)".

So it should be fine, and the building is working fine, and the program works fine.
However Eclipse/CDT/Code Analysis tells me there are several errors here, and this:
Invalid arguments '
Candidates are:
INTERVAL Norm(INTERVAL_VECTOR &)
double Norm(VECTOR &)
' file.cpp /path line 2155 Semantic Error

From the visual feedback, the code analysis does not recognize Diam (which receive the 'friend [...] Row' as argument), Norm (which receive the 'friend [...] Diam'), and endl (I'm guessing because the operator<< received the 'friend INTERVAL Norm' argument).

Any idea, beside shutting down the code analysis?

Thanks a lot for any help you could provide!

Previous Topic:Can't link libs - help please!
Next Topic:Error in debbuger in Eclipse CTD with Cygwin
Goto Forum:
  


Current Time: Fri Sep 20 20:56:00 GMT 2024

Powered by FUDForum. Page generated in 0.03468 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top