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. |