Suppose I have

```
template<class T>
void f(T t);

```

and 

```
template<class T>
class X
{   
};

```

If I want only `f<T>` to be friend of `X<T>`, I declare:

```
template<class T>
class X
{
    friend void f<>(T t);
};

```

Now suppose f is declared like this:

```
template<class T, class U>
void f(T t, U u);

```

I want to declare the following: for any type `U` `f<T, U>` is friend of `X<T>`. So I want `f<int, char>` to be friend of `X<int>`, but I don't want `f<char, int>` to be frient of `X<int>`. Is this possible? The following doesn't seem to compile

```
template<class T>
class X
{
    template <class U>  
    friend void f<>(T t, U, u);
};

```

Please note that I'm aware how to declare the whole template as friend.