I'm currently trying to write a function that takes an STL array of any type as one of its parameters. The obvious way to write:
template<typename T, int count>
void setArrayBufferData(GLenum usage, const std::array<T, count>& data) {
setArrayBufferData(usage, data.data(), sizeof(T) * count);
}
And here is another overload that it calls for reference only
void setArrayBufferData(GLenum usage, void* data, int size) {
glBufferData(GL_ARRAY_BUFFER, size, data, usage);
}
Function definition compiles fine. However, when I try to call it
std::array<int, 4> data;
setArrayBufferData(GL_STATIC_DRAW, data);
" setArrayBufferData". , , , , . , , std:: array, , , , , . , , ?