diff --git a/src/Magnum/GL/Context.cpp b/src/Magnum/GL/Context.cpp index 73bb860e8..b2542d3ee 100644 --- a/src/Magnum/GL/Context.cpp +++ b/src/Magnum/GL/Context.cpp @@ -28,6 +28,7 @@ #include /* std::lower_bound() */ #include #include +#include #include #include #include @@ -985,9 +986,9 @@ bool Context::tryCreate(const Configuration& configuration) { Debug{output} << " " << extension.string(); } - std::pair state = Implementation::State::allocate(*this, output); - _stateData = std::move(state.first); - _state = &state.second; + Containers::Pair> state = Implementation::State::allocate(*this, output); + _stateData = std::move(state.first()); + _state = &*state.second(); /* Print a list of used workarounds */ if(!_driverWorkarounds.isEmpty()) { diff --git a/src/Magnum/GL/Implementation/State.cpp b/src/Magnum/GL/Implementation/State.cpp index 3e6b12d39..b4d9b6180 100644 --- a/src/Magnum/GL/Implementation/State.cpp +++ b/src/Magnum/GL/Implementation/State.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include "Magnum/GL/Context.h" @@ -49,7 +50,7 @@ namespace Magnum { namespace GL { namespace Implementation { -std::pair State::allocate(Context& context, std::ostream* const out) { +Containers::Pair> State::allocate(Context& context, std::ostream* const out) { /* TextureState needs to track state per texture / image binding, fetch how many of them is there and allocate here as well so we don't need to do another nested allocation */ diff --git a/src/Magnum/GL/Implementation/State.h b/src/Magnum/GL/Implementation/State.h index b9d4635a8..819f04224 100644 --- a/src/Magnum/GL/Implementation/State.h +++ b/src/Magnum/GL/Implementation/State.h @@ -26,7 +26,6 @@ */ #include -#include #include #include "Magnum/Magnum.h" @@ -53,7 +52,7 @@ struct TransformFeedbackState; struct State { /* Initializes context-based functionality together with all nested classes in a single allocation */ - static std::pair allocate(Context& context, std::ostream* out); + static Containers::Pair> allocate(Context& context, std::ostream* out); enum: GLuint { DisengagedBinding = ~0u };