Home How to pass a templated vector to a C++ function?
 I am writting a function that needs to handle any type of vector passed into it, regardless of the inner type of the vector. The function takes in the vector, finds the size of the elements and then passes the data to the GPU. It would look something like: void Object_3D::set_instance_data(Renderer* handler, vector data) { glBindVertexArray(VAO); glBindBuffer(GL_SHADER_STORAGE_BUFFER, (VBOs[3])); glBufferData(GL_SHADER_STORAGE_BUFFER, data.size()*sizeof(T), data.data(), GL_DYNAMIC_COPY); }  However I cannot get this code to compile.