Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bug in Classview?

Status
Not open for further replies.

CodingNovice

Programmer
Dec 30, 2003
108
GB
I made a class with this sort of structure...

class A
{
public:
// funcs
private:
class A_Impl;
A_Impl* impl_;
};

and in the implementation file....

class A::A_Impl
{
// A's implementation
}

Now I believe this is right and it compiles fine but in classview instead of seeing A_Impl as a member of A, it has its own entry in the parent namespace. Also all the tooltips/autocomplete things read wrongly also. It seems as if the classview side of the IDE doesnt understand nested classes.Is this a known bug in classview?
I am right aren't I that I can forward declare a nested class in a class definition and define that nested class elsewhere as I have done.
 
As I understand it, A_Impl will be a class in it's own right, and so will apear in project explorer as a class (in case you include it elsewhere as well).

But in your example, you have no implementation of class A, and no header for A_Impl, do you have these in reality ?
 
>>But in your example, you have no implementation of class A, and no header for A_Impl, do you have these in reality ?

Of course. Its a very cut down example.

What I am saying is I have done above rather than this...

class A
{
public:
// funcs
private:
class A_Impl
{
public:
// funcs
private:
// the implementation of A
};
A_Impl* impl_;
};

So obviously if A is wrapped in namespace NS then the nested class is NS::A::A_Impl whereas classview seems to think that it is NS::A_Impl whereas the compiler agrees with me as it all compiles perfectly. I would just prefer that classview showed correct details. This class A_Impl is private to A so cannot be used anywhere else but inside of class A. So why does classview not show this relationship correctly?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top