Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 unwanted . to -> conversion for std pointers

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
noeldillabough Posted - Oct 21 2017 : 11:20:54 AM
similar to the posting std::string unwanted . to -> conversion

when I have a unique_ptr or shared_ptr and hit . it then gets converted to -> and I have to ctrl-z every time...drives me batty!

It happens on many versions of Visual Studio and I've tried the suggestions of recreating the indices etc.

std::unique_ptr<unsigned char> m_data;
m_data.(changes to ->)(ctrl-z changes back to .)get/release/reset etc

std::shared_ptr<unsigned char> m_data;
m_data.(changes to ->)(ctrl-z changes back to .)get

There's quite a few more places where this happens but smart pointers are used constantly. Disabling Visual Assist fixes it.

If it matters I'm currently on VS2017.
2   L A T E S T    R E P L I E S    (Newest First)
noeldillabough Posted - Oct 26 2017 : 11:32:26 AM
I shut off the feature and it indeed keeps the dot. However for something like this:

A* a;
a.member autocorrects it to a->member correctly.

Good enough for me! Thanks
feline Posted - Oct 21 2017 : 2:22:33 PM
Can you please try turning off the VA option:

VA Options -> Editor -> Convert dot to -> in C/C++
Convert dot to -> if operator -> is overloaded

and see if this fixes the problem for you? If this setting is turned On, then this behaviour is by design, but if you turn off the setting only for "operator -> is overloaded" the conversion will only stop for smart pointer classes, yet still happen for normal pointers.

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