Kurze Template + Friend-Frage



  • Wieso liefert folgender Code "function not accessible"?

    #include <iostream>
    
    class A {
    public:
    	template <typename X>
    	friend void f(const X& a) {
    		std::cout << a << std::endl;
    	}
    };
    
    int main() {
    	f(34);
    }
    

Log in to reply