Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Bug: Weird auto& dot expansion behavior in C++
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

saberhawk
New Member

6 Posts

Posted - Mar 12 2016 :  03:00:56 AM  Show Profile  Reply with Quote
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
    }
}

Edited by - saberhawk on Mar 12 2016 03:15:46 AM

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Mar 13 2016 :  3:47:48 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=94603
Go to Top of Page

saberhawk
New Member

6 Posts

Posted - Dec 21 2018 :  12:09:28 PM  Show Profile  Reply with Quote
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.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Dec 28 2018 :  2:05:04 PM  Show Profile  Reply with Quote
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.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000