This behavior is observed in version 10.0.40219.SP1RelI have this code:class Stored {public: void Whatever();private: void operator&();};int _tmain(int /*argc*/, _TCHAR* /*argv*/[]){ std::vector<Stored>(1).begin()->Whatever();}that fails to compile with this output:vector(327): error C2248: 'Stored::operator &' : cannot access private member declared in class 'Stored'vector(327) refers to this code:pointer operator->() const{ // return pointer to class objectreturn (&**this);}The code I showed is of course insane. Yet there're classes like _com_ptr_t and CComPtr that have operator&() overloaded - they can't be used in the scenario I show either. Same seems to apply to other STL containers."&" should be replaced with std::addressof() function here.
Visual Studio/Team Foundation Server/.NET Framework Tooling version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results