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