#include <iostream>
using namespace std;

extern "C"
class Test1 {
public:
    static void foo(int a)
    {
    	cout << "foo called with " << a << endl;
    }
};

class Test {
public:
    static void foo(int a) noexcept
    {
    	cout << "foo called with " << a << endl;
    }
};


extern "C" void bar(void (*fp)(int))
{
	fp(42);
}

int main() {
	bar(Test1::foo);
	bar(Test::foo);
	
	return 0;
}