Suppose I have the following:
template<typename T>
    struct Foo
    {
    public:
        class Bar
        {           
        };
    };
If I then define the function
template <typename T>
void func(Foo<T>::Bar g) { }
I get an error: syntax error: identifier 'Bar'
Why do I get the error and how can I solve it so that I can use the templated function.