#include <iostream>

template<class T>
class Model
{
    class Texture;
    public:
      T f(T);
};

template<typename T>
class Model<T>::Texture 
{
  //you should be able to use T here, even though Texture is not a template!
public:
   T m_data;   //T here
   Texture(T data) : m_data(data) //T here also!
   {}
};

template<typename T>
T Model<T>::f(T data)
{
    Texture t(data);
    return t.m_data; //access member data
}

int main() {
	Model<int> m;
        std::cout << m.f(100) << std::endl;
	return 0;
}