Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 friend and forward declarations

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
leto58 Posted - Oct 07 2008 : 04:32:13 AM
Hi,

If I write
class B
{
	friend class A;
};

VA handles A properly.

If I write
class A;

class B
{
	friend A;
};

which is legal C++ too, as far as I know, A is handled as an unknown variable rather than as a class, by VA.

Regards,
Leto



VA_X.dll file version 10.4.1649.0 built 2008.09.09
Licensed to:xxx
DevEnv.exe version 8.0.50727.867
msenv.dll version 8.0.50727.867
Font: Courier 13(Pixels)
Comctl32.dll version 6.10.6001.18000
Windows Vista 6.0 Build 6001 Service Pack 1
4 processors

Platform: Win32
Stable Includes:
D:\\Program Files\\Microsoft Visual Studio 8\\VC\\include;
D:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\include;
D:\\Program Files\\Microsoft Visual Studio 8\\VC\\PlatformSDK\\include;
D:\\Program Files\\Microsoft Visual Studio 8\\SDK\\v2.0\\include;

Other Includes:

Stable Source Directories:
D:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\mfc;
D:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\mfcm;
D:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\src\\atl;
D:\\Program Files\\Microsoft Visual Studio 8\\VC\\crt\\src;

3   L A T E S T    R E P L I E S    (Newest First)
accord Posted - Oct 08 2008 : 03:51:35 AM
I am seeing the same thing here, thank you for the clear description:

case=20190
leto58 Posted - Oct 07 2008 : 5:23:53 PM
Hi,
Excuse me for my too short explanation. Here is a more complete example:
(Note: class A is defined in another file in my project)

if I write
class B
{
	friend class A;
	A* MyFunction();
};

A is highlighted with color defined for "class, structures and typedefs" and if I click the VA arrow above MyFunction, I get (among others) "create Implementation".


if I write

class A;

class B
{
	friend A;
	A* MyFunction();
};

A is highlighted with color defined for "Variables" and if I click the VA arrow above MyFunction, I DO NOT get "create Implementation".

Regards,
Leto
accord Posted - Oct 07 2008 : 4:00:45 PM
Why do you think that A is handled as an unknown variable?
It is underlined with red for you, or do you see/experience something else?

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000