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
 Feature Requests
 Multiple constructors in structure/class
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

pk_asw
Ketchup Master

Czech Republic
66 Posts

Posted - Aug 01 2007 :  5:48:16 PM  Show Profile  Reply with Quote
Hello,
VA (build 1555) doesnt show me multiple constructors in the structure (intellisense). I have to turn "Advanced/Listboxes/Get content from default Intellisense" to see all constructors (but then MSVC shows me listbox from VA and listbox from MSVC).

my structure:

struct MY_STRUCT {
int m_a;
char *m_b;
MY_STRUCT( int a ) : m_a( a ) { };
MY_STRUCT( char *b ) : m_b( b ) { };
};

When I type: "MY_STRUCT(" I'd like to see both constructors to choose which one I'd like to use.

thanks,
-pk

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Aug 02 2007 :  09:11:26 AM  Show Profile  Reply with Quote
using VS2005 and VA 1559 I changed the code a little, ending up with this code in a header file:

struct MY_STRUCT {
	int m_a;
	char *m_b;
public:
	MY_STRUCT( int a ) : m_a( a ) { };
	MY_STRUCT( char *b ) : m_b( b ) { };
};


and this code in the matching cpp file:

static void testStructConstructors()
{
	MY_STRUCT foo(1);
}


with this code, when I typed the '(' in the cpp file, or place my caret between the brackets and press CTRL-SHIFT-SPACE to see the parameter info tooltip both overloads are listed for me.

Which IDE are you using?
If you upgrade to VA 1559 does this help?

http://www.wholetomato.com/downloads/default.asp

zen is the art of being at one with the two'ness
Go to Top of Page

pk_asw
Ketchup Master

Czech Republic
66 Posts

Posted - Aug 02 2007 :  10:24:09 AM  Show Profile  Reply with Quote
thanks for reply.
I've installed the latest VA (build 1559) and in VS.NET 2005 I've typed your modified code. Again, when I typed the "(" VA showed me only the one (latest) constructor:


I had to turn on "Advanced/Listboxes/Get content from default Intellisense" to see both constructors.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Aug 02 2007 :  11:59:01 AM  Show Profile  Reply with Quote
Very strange, now I am able to reproduce the bug all of the time. I saw some odd effects on my first group of tests, but nothing I could reproduce or pin down.

I dislike bugs like this.

I have put in a bug report, hopefully our developers will be able to reproduce this reliably:

case=8019

zen is the art of being at one with the two'ness
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