Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Bug: Weird auto& dot expansion behavior in C++

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
saberhawk Posted - Mar 12 2016 : 03:00:56 AM
void TestCase()
{
    struct Point
    {
        int x, y;
    };
    
    Point point_zero;
    auto& p0 = point_zero;
    p0; // correct behavior: typing p0. results in . character + completion menu

    Point points[2];
    auto& p1 = points[1];
    p1; // incorrect behavior: typing p1. results in -> sequence + completion menu

    for (int i = 0; i < 2; ++i)
    {
        auto& p = points[i];
        p; // incorrect behavior: typing p. results in -> sequence + completion menu
    }

    std::unique_ptr<Point> pointer_zero;
    auto& ptr0 = pointer_zero;
    ptr0;  // correct behavior: typing ptr0. results in -> sequence + completion menu

    std::unique_ptr<Point> pointers[2];
    auto& ptr1 = pointers[1];
    ptr1; // incorrect behavior: typing ptr1. results in . character + completion menu

    for (int i = 0; i < 2; ++i)
    {
        auto& ptr = pointers[i];
        ptr; // incorrect behavior: typing ptr. results in . character + completion menu
    }
}
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Dec 28 2018 : 2:05:04 PM
Unfortunately this is still on our list of bugs to fix. We are still aware of this, and it has not been forgotten, but unfortunately I don't currently have an estimate for when we will have a fix for this.
saberhawk Posted - Dec 21 2018 : 12:09:28 PM
This is still happening in build 2302. The "convert dot to -> in C/C++" is inappropriately converting my dots into arrows when it shouldn't, and it's not doing so when it should.
accord Posted - Mar 13 2016 : 3:47:48 PM
I am seeing the same effect here. Thank you for the clear description.

case=94603

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