Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Intellesense Problem w/Boost

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
photo_tom Posted - Apr 15 2010 : 2:08:04 PM
I'm using VA 10.5.1738.0 on VS2008sp1.

I'm having a problem with intellesnse getting confused when I use the following code at the header of my c++ member function -

	QDataStream* ds = NULL;
	QDataStream* dsNew = NULL;
	BOOST_SCOPE_EXIT((ds)(dsNew))
		{
		delete ds;
		delete dsNew;
		}BOOST_SCOPE_EXIT_END ;


If I comment out the boost section, intellesense starts working again w/o any problems. Suggestions?
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Apr 23 2010 : 3:55:15 PM
Can you explain what problems you are seeing? Using VA 1822 I have added the following code to a C++ header file:

class testBoostScopeExit
{
	QDataStream* ds = NULL;
	QDataStream* dsNew = NULL;
	BOOST_SCOPE_EXIT((ds)(dsNew))
	{
		delete ds;
		delete dsNew;
	}BOOST_SCOPE_EXIT_END ;
	QDataStream* dsAfter = NULL;
};

static void testUsingBoostScopeClass()
{
	testBoostScopeExit fooBoost;
	fooBoost.|
}


When I type the dot, I get a listbox showing me 4 members of this class. "BOOST_SCOPE_EXIT" is also listed, along with the three member variables, which is not ideal, but so far I am not seeing any significant problems.
photo_tom Posted - Apr 15 2010 : 3:08:03 PM
quote:
Originally posted by gmit

May I ask why don't you use auto_ptr instead? Code will be more readable, it will compile faster and VA won't be confused by Boost preprocessor library.




Because the BOOST_SCOPE_EXIT works differently. The purpose of this macro is not to create a pointer, but rather to ensure under all possible (including exceptions) reasons, when the routine exits, the two pointers will be deleted. I've forwarded the syntax for the simplest case to this forum. In reality, I have some more complex cases where I need the functionality that this gives me.
gmit Posted - Apr 15 2010 : 2:32:48 PM
May I ask why don't you use auto_ptr instead? Code will be more readable, it will compile faster and VA won't be confused by Boost preprocessor library.

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