[ create a new paste ] login | about

Link: http://codepad.org/uzi5sv8G    [ raw code | output | fork ]

C++, pasted on Apr 17:
#include <iostream>


namespace A
{

struct X {};

void F(X)
{
	std::cout << "A::F(A::X)" << std::endl;
}
/*
void G(X)
{
	std::cout << "A::G(A::X)" << std::endl;
}
*/
}


namespace B
{

void G(A::X)
{
	std::cout << "B::G(A::X)" << std::endl;
}

struct Y
{
	friend void Call(Y)
	{
		F(A::X());
		G(A::X());
	};
};

}


int main(void)
{
	Call(B::Y());
	
	return 0;
}


Output:
1
2
A::F(A::X)
B::G(A::X)


Create a new paste based on this one


Comments: