Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 VA doesn't recognise constructor with #pragma
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

yym
Senior Member

Israel
31 Posts

Posted - Jan 17 2010 :  07:16:10 AM  Show Profile  Reply with Quote
Given the following code:

MyClass::MyClass()
#pragma warning(suppress:4355)
: m_member(this)
#pragma warning(suppress:4355)
, m_member2(this)
{
}

Visual Assist doesn't recognise this as being a constructor.
If the first pragma is removed it's OK.

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jan 18 2010 :  03:45:58 AM  Show Profile  Reply with Quote
What are you exactly seeing? For me, the constructor was recognized using VS2008 and VA 1738, but m_member and m_member2 was underlined. Is that what you are seeing?

I expanded your example with class declaration for the test:

class MyTest
{
    MyTest* m_member;
    MyTest* m_member2;
    MyTest();
}


When I placed the caret over the constructor in your code and pressed alt+G it took me to the constructor in my class declaration.
Go to Top of Page

yym
Senior Member

Israel
31 Posts

Posted - Jan 18 2010 :  06:39:59 AM  Show Profile  Reply with Quote
I didn't check Alt+G. m_member and m_member2 are underlined, and in the constructor the class members aren't suggested. Also the constructor doesn't appear in VA Outline.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jan 18 2010 :  12:57:08 PM  Show Profile  Reply with Quote
I am seeing the same effects here. Thank you for the clear description.

case=11545
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000