c++ - Why does this private template function compile? -> Compiler Bug VS 2009 -


this compiles out problems in vs 2009? stupid? gcc gives warning, template private....? missing?

#include <iostream>  using namespace std;  class { private:     template<typename t>     a& operator<<(const t & v)     {         cout << v << endl;         return *this;     } };  int main() {    a;    << 4;    system("pause"); } 

microsoft acknowledges bug , claims fixed in next major release compiler (which read vc11/vs-whatever-is-after-2010 - not service pack vc10/vs2010):

from comments, fix appears made internal compiler build.


Comments

Popular posts from this blog

Python __call__ special method practical example -

How can I edit my VIM config so that Vim treats ".ejs" files the same as it currently treats my html files? -