From b6c37ef077101a6564ef04a0b5c4c2d4039f85d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 28 Apr 2017 21:39:05 +0200 Subject: [PATCH] Test that ImageView can eat non-const ArrayView. Doesn't compile due to ambiguous overload error. --- src/Magnum/Test/ImageViewTest.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Magnum/Test/ImageViewTest.cpp b/src/Magnum/Test/ImageViewTest.cpp index 6c218fc4a..ae65cfef9 100644 --- a/src/Magnum/Test/ImageViewTest.cpp +++ b/src/Magnum/Test/ImageViewTest.cpp @@ -103,11 +103,14 @@ void ImageViewTest::constructCompressed() { #ifdef MAGNUM_BUILD_DEPRECATED void ImageViewTest::constructDeprecatedArrayView() { - const char data[12]{}; - Containers::ArrayView view{data}; + char data[12]{}; + Containers::ArrayView view{data}; ImageView2D a{PixelFormat::RGB, PixelType::UnsignedByte, {1, 3}, view}; - CORRADE_COMPARE(a.data(), data); + + Containers::ArrayView cview{data}; + ImageView2D b{PixelFormat::RGB, PixelType::UnsignedByte, {1, 3}, cview}; + CORRADE_COMPARE(b.data(), data); } void ImageViewTest::constructDeprecatedArray() {