Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Iterator parsing issue with typedefs

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
BigHands Posted - Sep 01 2010 : 08:42:09 AM
I'm having an issue where the autocomplete box is incorrect when dereferencing an iterator. I've attached a screenshot of the problem and the example code for easy cut and paste. (I'm using VS2008)



http://img251.imageshack.us/i/vaxparseerror.jpg/]



#include <vector>

template<class T, class A = std::allocator<T> >
struct vector
{
	typedef std::vector<T, A> type;
};

struct Simple
{
	int a;
	float b;

	Simple(int _a, float _b) : a(_a), b(_b){}
};

int main(int argc, char* argv[])
{
	vector<Simple>::type v;
	v.push_back(Simple(11, 11.0f));
	v.push_back(Simple(22, 22.0f));

	vector<Simple>::type::const_iterator iter;
	for(iter = v.begin() ; iter != v.end() ; ++iter)
	{
		int a = (*iter)##PUT DOT HERE##
	}

	return 0;
}
1   L A T E S T    R E P L I E S    (Newest First)
accord Posted - Sep 01 2010 : 3:17:13 PM
I was able to reproduce the problem and put in a bug report for this:

case=49403

Thank you for the clear sample. For now, you can turn on

VA Options -> Advanced -> Listboxes -> Get content from default Intellisense

as a workaround. I tried and it worked with VS2008 SP1 for me.

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