Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 auto_ptr vs vector confusion

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
a.chinyakov Posted - Jul 22 2015 : 1:36:15 PM
Consider the following code:

#include <vector>

class Something
{
public:
	Something( size_t const s ) : m_data( s ) {}

	std::vector< char > getData() { return m_data; }

private:
	std::vector< char > m_data;
};


int main()
{
	std::auto_ptr< Something > smth( new Something( 42 ) );

	std::vector< char > data( smth->getData() );

	size_t const dataSize( data

(sic!)
When I press dot button I get dot replaced by "->" and when I press Backspace it turns back to "." as I expect:



There is no such problem when I have no constructor defined.

Using VS2008 and VA X 10.9.2068.0
1   L A T E S T    R E P L I E S    (Newest First)
accord Posted - Jul 23 2015 : 5:26:29 PM
Thank you for taking the time to reproduce this. I have put in a bug report for this:

case=91016

For now, you can turn the following setting off as a workaround:

VA Options -> Corrections -> Convert dot to -> if operator -> is overloaded

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