static int func(); // proto for a static func
class AClass
{
friend int func(); // can be a friend and retains its static linkage
friend int anotherfunc(); // assumed to have external linkage
};
Static funcs can be friends. A static member can also be used to access an objects internals as long as it recieves a this pointer explicitly when its called. This trick is often used when wrapping the win32 api up to have a static wndproc pass down the messages to a virtual wndproc. This is done usually by storing the this pointer as a windowlong and retrieving it in the static func so that the virtual wndproc can be called.