diff --git a/src/Buffer.h b/src/Buffer.h index 9ef4d2c9f..00001239f 100644 --- a/src/Buffer.h +++ b/src/Buffer.h @@ -590,10 +590,16 @@ class MAGNUM_EXPORT Buffer { * * @see setData(GLsizeiptr, const GLvoid*, Usage). */ + #ifdef CORRADE_GCC46_COMPATIBILITY + #define size size_ /* With GCC 4.6 it conflicts with size(). WTF. */ + #endif template Buffer* setData(const T(&data)[size], Usage usage) { setData(size*sizeof(T), data, usage); return this; } + #ifdef CORRADE_GCC46_COMPATIBILITY + #undef size + #endif /** * @brief Set buffer data @@ -639,10 +645,16 @@ class MAGNUM_EXPORT Buffer { * * @see setSubData(GLintptr, GLsizeiptr, const GLvoid*) */ + #ifdef CORRADE_GCC46_COMPATIBILITY + #define size size_ /* With GCC 4.6 it conflicts with size(). WTF. */ + #endif template Buffer* setSubData(GLintptr offset, const T(&data)[size]) { setSubData(offset, size*sizeof(T), data); return this; } + #ifdef CORRADE_GCC46_COMPATIBILITY + #undef size + #endif /** * @brief Set buffer subdata