When trying to find out why auto type deduction almost never seemed to be able to derive types, I found the following explanation/workaround.
I my setup is as follows: header file #pragma once
namespace TT { class Test { private: Test* s; public: Test(); int getValue() const; }; }
cpp file #include "Test.h"
using namespace TT;
Test::Test() { auto x = s; x. // Autocompletion does nothing }
However, if I change the cpp file to #include "Test.h"
namespace TT { Test::Test() { auto x = s; x. // Autocompletion works perfectly } }
Is there a way to get the upper one working. It is valid c++ and quite standard, so I hope it can be fixed, as our complete codebase is built in that way (and it's quite large ;) ).
I'm able to repro the problem. Thanks for taking the time to gather the conditions and report it. No workaround at this time. I've opened a bug report for it: case=85849
Unfortunately, it may not be fixed in the next release but should be addressed by the following one. This case will be updated when it is fixed.