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

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -