diff --git a/src/Magnum/GL/Attribute.h b/src/Magnum/GL/Attribute.h index 7850f2110..ee1c3e683 100644 --- a/src/Magnum/GL/Attribute.h +++ b/src/Magnum/GL/Attribute.h @@ -314,7 +314,12 @@ template class Attribute { * count is set to the same value as in type used in shader (e.g. * @ref Components::Three for @ref Magnum::Vector3 "Vector3"). */ - constexpr Attribute(DataOptions dataOptions = DataOptions()): Attribute{Implementation::Attribute::DefaultComponents, Implementation::Attribute::DefaultComponentCount*Implementation::Attribute::DefaultDataTypeSize, Implementation::Attribute::DefaultDataType, dataOptions} {} + constexpr Attribute(DataOptions dataOptions = DataOptions()): Attribute{ + Implementation::Attribute::DefaultComponents, + /* Cast one enum to avoid -Wdeprecated-anon-enum-conversion when + compiling as C++20 */ + Implementation::Attribute::DefaultComponentCount*UnsignedInt(Implementation::Attribute::DefaultDataTypeSize), + Implementation::Attribute::DefaultDataType, dataOptions} {} /** * @brief Constructor