Browse Source

MSVC 2013 compatibility: no rvalue references for *this.

Vladimír Vondruš 12 years ago
parent
commit
083cdcd679
  1. 6
      src/Magnum/Image.h
  2. 4
      src/Magnum/Test/ImageTest.cpp
  3. 6
      src/Magnum/Trade/ImageData.h
  4. 4
      src/Magnum/Trade/Test/ImageDataTest.cpp

6
src/Magnum/Image.h

@ -83,13 +83,13 @@ template<UnsignedInt dimensions> class Image: public AbstractImage {
/** @brief Conversion to reference */ /** @brief Conversion to reference */
/*implicit*/ operator ImageReference<dimensions>() /*implicit*/ operator ImageReference<dimensions>()
#ifndef CORRADE_GCC47_COMPATIBILITY #if !defined(CORRADE_GCC47_COMPATIBILITY) && !defined(CORRADE_MSVC2013_COMPATIBILITY)
const &; const &;
#else #else
const; const;
#endif #endif
#ifndef CORRADE_GCC47_COMPATIBILITY #if !defined(CORRADE_GCC47_COMPATIBILITY) && !defined(CORRADE_MSVC2013_COMPATIBILITY)
/** @overload */ /** @overload */
/*implicit*/ operator ImageReference<dimensions>() const && = delete; /*implicit*/ operator ImageReference<dimensions>() const && = delete;
#endif #endif
@ -171,7 +171,7 @@ template<UnsignedInt dimensions> inline Image<dimensions>& Image<dimensions>::op
} }
template<UnsignedInt dimensions> inline Image<dimensions>::operator ImageReference<dimensions>() template<UnsignedInt dimensions> inline Image<dimensions>::operator ImageReference<dimensions>()
#ifndef CORRADE_GCC47_COMPATIBILITY #if !defined(CORRADE_GCC47_COMPATIBILITY) && !defined(CORRADE_MSVC2013_COMPATIBILITY)
const & const &
#else #else
const const

4
src/Magnum/Test/ImageTest.cpp

@ -125,8 +125,8 @@ void ImageTest::toReference() {
CORRADE_VERIFY((std::is_convertible<const Image2D&, ImageReference2D>::value)); CORRADE_VERIFY((std::is_convertible<const Image2D&, ImageReference2D>::value));
{ {
#ifdef CORRADE_GCC47_COMPATIBILITY #if defined(CORRADE_GCC47_COMPATIBILITY) || defined(CORRADE_MSVC2013_COMPATIBILITY)
CORRADE_EXPECT_FAIL("Rvalue references for *this are not supported in GCC < 4.8.1."); CORRADE_EXPECT_FAIL("Rvalue references for *this are not supported in GCC < 4.8.1 or MSVC.");
#endif #endif
CORRADE_VERIFY(!(std::is_convertible<const Image2D, ImageReference2D>::value)); CORRADE_VERIFY(!(std::is_convertible<const Image2D, ImageReference2D>::value));
CORRADE_VERIFY(!(std::is_convertible<const Image2D&&, ImageReference2D>::value)); CORRADE_VERIFY(!(std::is_convertible<const Image2D&&, ImageReference2D>::value));

6
src/Magnum/Trade/ImageData.h

@ -73,13 +73,13 @@ template<UnsignedInt dimensions> class ImageData: public AbstractImage {
/** @brief Conversion to reference */ /** @brief Conversion to reference */
/*implicit*/ operator ImageReference<dimensions>() /*implicit*/ operator ImageReference<dimensions>()
#ifndef CORRADE_GCC47_COMPATIBILITY #if !defined(CORRADE_GCC47_COMPATIBILITY) && !defined(CORRADE_MSVC2013_COMPATIBILITY)
const &; const &;
#else #else
const; const;
#endif #endif
#ifndef CORRADE_GCC47_COMPATIBILITY #if !defined(CORRADE_GCC47_COMPATIBILITY) && !defined(CORRADE_MSVC2013_COMPATIBILITY)
/** @overload */ /** @overload */
/*implicit*/ operator ImageReference<dimensions>() const && = delete; /*implicit*/ operator ImageReference<dimensions>() const && = delete;
#endif #endif
@ -142,7 +142,7 @@ template<UnsignedInt dimensions> inline ImageData<dimensions>& ImageData<dimensi
} }
template<UnsignedInt dimensions> inline ImageData<dimensions>::operator ImageReference<dimensions>() template<UnsignedInt dimensions> inline ImageData<dimensions>::operator ImageReference<dimensions>()
#ifndef CORRADE_GCC47_COMPATIBILITY #if !defined(CORRADE_GCC47_COMPATIBILITY) && !defined(CORRADE_MSVC2013_COMPATIBILITY)
const & const &
#else #else
const const

4
src/Magnum/Trade/Test/ImageDataTest.cpp

@ -111,8 +111,8 @@ void ImageDataTest::toReference() {
CORRADE_VERIFY((std::is_convertible<const Trade::ImageData2D&, ImageReference2D>::value)); CORRADE_VERIFY((std::is_convertible<const Trade::ImageData2D&, ImageReference2D>::value));
{ {
#ifdef CORRADE_GCC47_COMPATIBILITY #if defined(CORRADE_GCC47_COMPATIBILITY) || defined(CORRADE_MSVC2013_COMPATIBILITY)
CORRADE_EXPECT_FAIL("Rvalue references for *this are not supported in GCC < 4.8.1."); CORRADE_EXPECT_FAIL("Rvalue references for *this are not supported in GCC < 4.8.1 or MSVC.");
#endif #endif
CORRADE_VERIFY(!(std::is_convertible<const Trade::ImageData2D, ImageReference2D>::value)); CORRADE_VERIFY(!(std::is_convertible<const Trade::ImageData2D, ImageReference2D>::value));
CORRADE_VERIFY(!(std::is_convertible<const Trade::ImageData2D&&, ImageReference2D>::value)); CORRADE_VERIFY(!(std::is_convertible<const Trade::ImageData2D&&, ImageReference2D>::value));

Loading…
Cancel
Save