#include <iostream>

template <typename> class test;

template <> 
class test<int> {
    int y; 
public:     
    test(int k) : y(k) {}     
    friend std::ostream& operator<<(std::ostream& os, const test& t); 
};  

std::ostream& operator<< (std::ostream& os, const test<int>& t) 
{
    return os << t.y;
}  

int main()
{
	test<int> a(42);
	std::cout << a << std::endl;
}
