It seems like IntelliSense is falsely reporting that member variables and functions are inaccessible in a special case:
When a template classes specialisation - i.e. "Templ" - defines a nested class - i.e. "Intern" - which in turn specifies "Templ" as its friend, IntelliSense reports all private and protected members of "Intern" to be inaccessible from inside "Templ". The code does compile fine, though.
To test this, create a new Console Application with standard settings and replace the contents of ConsoleApplication1.cpp with the following:
#include "stdafx.h" template<typename T> class Templ{}; template<> class Templ < int > { class Intern{ friend class Templ < int > ; int x; } in; public: void check(){ in.x = 5; //the x is underlined } }; class Foo{ class Intern{ friend class Foo; int x; } in; public: void check(){ in.x = 5; //everything working fine } }; int _tmain(int argc, _TCHAR* argv[]) { Templ<int> a{}; a.check(); Foo f{}; f.check(); return 0; //both f and a have the same values for in.x }Is this a configuration issue or a bug in IntelliSense?