C ++模板类的内部类访问

我有这样的课:

template <class T>
class LL
{
        class Node
        {
            //some code
        };

 public:
        Node* head()
        {
            return m_first;
        }
};

I also have a function template somewhere else that tries to access Node and looks like this with two compiler errors:

template <typename T>
int getSize(LL<T>::Node* node) //C2065: node is undeclared, C3861: node is not found
{
    //some code
} //does not compile

一段时间后,我再次尝试使用两个编译器:

template <typename T>
int getSize(LL<T>::Node<T>* node) //C2065 like before, C7510: use of dependent template name must be prefixed with 'template'
{
    //some code
} //does not compile

再过一段时间后,我尝试了以下编译良好的方法。

template <typename T>
int getSize(typename LL<T>::template Node<T>* node)
{
    //some code
}

现在,当我尝试从驱动程序函数调用此函数时,再次出现编译器错误:

int main()
{
    LL<int> ll;
    std::cout << getSize(ll.head()); //E0304, C2672 and C2783

    //E0304: no instance of the function template "getSize" matches the argument list
    //C2672: no matching overload function found
    //C2783: could not deduce template argument for 'T'
}

我尝试了一切可能且无法解决的问题。有人可以解释一下发生了什么吗?