diff --git a/src/Magnum/Image.h b/src/Magnum/Image.h index f5af9a50b..50762aadf 100644 --- a/src/Magnum/Image.h +++ b/src/Magnum/Image.h @@ -144,10 +144,24 @@ template class Image { * * @see @ref release() */ - Containers::ArrayView data() { return _data; } + Containers::ArrayView data() + #ifndef CORRADE_GCC47_COMPATIBILITY + & + #endif + { return _data; } + #ifndef CORRADE_GCC47_COMPATIBILITY + Containers::ArrayView data() && = delete; /**< @overload */ + #endif /** @overload */ - Containers::ArrayView data() const { return _data; } + Containers::ArrayView data() const + #ifndef CORRADE_GCC47_COMPATIBILITY + & + #endif + { return _data; } + #ifndef CORRADE_GCC47_COMPATIBILITY + Containers::ArrayView data() const && = delete; /**< @overload */ + #endif /** @overload */ template T* data() { diff --git a/src/Magnum/Trade/ImageData.h b/src/Magnum/Trade/ImageData.h index 7ff2e5561..2c6492aa0 100644 --- a/src/Magnum/Trade/ImageData.h +++ b/src/Magnum/Trade/ImageData.h @@ -221,10 +221,24 @@ template class ImageData { * * @see @ref release() */ - Containers::ArrayView data() { return _data; } + Containers::ArrayView data() + #ifndef CORRADE_GCC47_COMPATIBILITY + & + #endif + { return _data; } + #ifndef CORRADE_GCC47_COMPATIBILITY + Containers::ArrayView data() && = delete; /**< @overload */ + #endif /** @overload */ - Containers::ArrayView data() const { return _data; } + Containers::ArrayView data() const + #ifndef CORRADE_GCC47_COMPATIBILITY + & + #endif + { return _data; } + #ifndef CORRADE_GCC47_COMPATIBILITY + Containers::ArrayView data() const && = delete; /**< @overload */ + #endif /** @overload */ template T* data() {