From a9a5ead13d15346800db779ee291fc7de0c3b9f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 24 May 2014 14:38:14 +0200 Subject: [PATCH] Dropped GCC 4.6 support. --- CMakeLists.txt | 4 +- README.md | 6 +- doc/building.dox | 8 +- doc/portability.dox | 2 +- package/archlinux/PKGBUILD-gcc46 | 56 ------------ package/ci/jenkins-gltests.xml | 1 - package/ci/jenkins.xml | 1 - src/CMakeLists.txt | 7 -- src/Magnum/Array.h | 6 -- src/Magnum/Context.cpp | 4 - src/Magnum/DebugTools/ForceRenderer.cpp | 9 -- .../Implementation/AxisAlignedBoxRenderer.h | 2 - .../DebugTools/Implementation/BoxRenderer.h | 2 - .../Implementation/CapsuleRenderer.h | 2 - .../Implementation/CylinderRenderer.h | 2 - .../Implementation/LineSegmentRenderer.h | 2 - .../DebugTools/Implementation/PointRenderer.h | 2 - .../Implementation/SphereRenderer.h | 2 - src/Magnum/Magnum.h | 88 ------------------- src/Magnum/Math/Angle.h | 8 -- src/Magnum/Math/BoolVector.h | 6 -- src/Magnum/Math/Math.h | 6 -- src/Magnum/Math/Matrix.h | 14 +-- src/Magnum/Math/Range.h | 3 - src/Magnum/Math/RectangularMatrix.h | 27 ------ src/Magnum/Math/Test/AngleTest.cpp | 4 - src/Magnum/Math/Test/BoolVectorTest.cpp | 8 -- src/Magnum/Math/Test/Matrix3Test.cpp | 10 +-- src/Magnum/Math/Test/Matrix4Test.cpp | 10 +-- src/Magnum/Math/Test/MatrixTest.cpp | 10 +-- src/Magnum/Math/Test/RangeTest.cpp | 23 +---- .../Math/Test/RectangularMatrixTest.cpp | 15 +--- src/Magnum/Math/Test/Vector2Test.cpp | 15 +--- src/Magnum/Math/Test/Vector3Test.cpp | 15 +--- src/Magnum/Math/Test/Vector4Test.cpp | 15 +--- src/Magnum/Math/Test/VectorTest.cpp | 20 +---- src/Magnum/Math/Vector.h | 24 ----- src/Magnum/MeshTools/CombineIndexedArrays.cpp | 4 - src/Magnum/MeshTools/RemoveDuplicates.h | 4 - src/Magnum/MeshTools/Test/TransformTest.cpp | 9 -- .../Implementation/EglContextHandler.h | 2 - .../Implementation/GlxContextHandler.h | 2 - src/Magnum/Platform/NaClApplication.h | 1 - .../Platform/WindowlessNaClApplication.h | 1 - src/Magnum/Platform/magnum-info.cpp | 4 - src/Magnum/ResourceManager.h | 4 - src/Magnum/SceneGraph/AbstractCamera.h | 14 --- src/Magnum/SceneGraph/AbstractFeature.h | 23 +---- .../SceneGraph/AbstractGroupedFeature.h | 10 --- src/Magnum/SceneGraph/AbstractObject.h | 10 --- .../SceneGraph/AbstractTransformation.h | 16 ---- src/Magnum/SceneGraph/AbstractTranslation.h | 16 ---- src/Magnum/SceneGraph/Animable.h | 14 --- src/Magnum/SceneGraph/AnimableGroup.h | 14 --- src/Magnum/SceneGraph/Camera2D.h | 7 +- src/Magnum/SceneGraph/Camera3D.h | 7 +- src/Magnum/SceneGraph/Drawable.h | 40 --------- src/Magnum/SceneGraph/FeatureGroup.h | 10 --- src/Magnum/SceneGraph/SceneGraph.h | 54 ------------ .../SceneGraph/TranslationTransformation.h | 16 ---- src/Magnum/Shapes/shapeImplementation.h | 1 - src/Magnum/Test/AbstractOpenGLTester.h | 1 - src/Magnum/Test/AbstractQueryGLTest.cpp | 3 - .../Test/AbstractShaderProgramGLTest.cpp | 3 - src/Magnum/Test/AbstractTextureGLTest.cpp | 3 - src/Magnum/Test/ArrayTest.cpp | 4 - src/Magnum/Test/BufferGLTest.cpp | 3 - src/Magnum/Test/BufferImageGLTest.cpp | 3 - src/Magnum/Test/ColorTest.cpp | 15 +--- src/Magnum/Test/FramebufferGLTest.cpp | 3 - src/Magnum/Test/ImageTest.cpp | 3 - src/Magnum/Test/MeshGLTest.cpp | 3 - src/Magnum/Test/RenderbufferGLTest.cpp | 3 - src/Magnum/Test/ResourceManagerTest.cpp | 1 - src/Magnum/Test/ShaderGLTest.cpp | 3 - src/Magnum/Trade/Test/ImageDataTest.cpp | 3 - src/MagnumPlugins/MagnumFont/MagnumFont.cpp | 8 -- .../MagnumFontConverter.cpp | 8 -- src/MagnumPlugins/ObjImporter/ObjImporter.cpp | 8 -- 79 files changed, 42 insertions(+), 758 deletions(-) delete mode 100644 package/archlinux/PKGBUILD-gcc46 diff --git a/CMakeLists.txt b/CMakeLists.txt index bd221393c0..67c0cf43c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,8 +108,8 @@ if(BUILD_TESTS) endif() # Check compiler compatibility -if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.6.0") - message(FATAL_ERROR "Compatibility branch of Magnum is needed for use with GCC < 4.6. See the documentation for more information.") +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.7.0") + message(FATAL_ERROR "Compatibility branch of Magnum is needed for use with GCC < 4.7. See the documentation for more information.") elseif(MSVC) message(FATAL_ERROR "Compatibility branch of Magnum is needed for use with MSVC. See the documentation for more information.") endif() diff --git a/README.md b/README.md index 5a22c78895..ffa8e951d7 100644 --- a/README.md +++ b/README.md @@ -84,9 +84,9 @@ Minimal dependencies -------------------- * C++ compiler with good C++11 support. Currently there are two compilers - which are tested to have everything needed: **GCC** >= 4.6 and **Clang** - >= 3.1. On Windows you can use **MinGW**. GCC 4.5, 4.4 and **MSVC** 2013 - support involves some ugly workarounds and thus is available only in + which are tested to have everything needed: **GCC** >= 4.7 and **Clang** + >= 3.1. On Windows you can use **MinGW**. GCC 4.6, 4.5, 4.4 and **MSVC** + 2013 support involves some ugly workarounds and thus is available only in `compatibility` branch. * **CMake** >= 2.8.8 * **Corrade** - Plugin management and utility library. You can get it at diff --git a/doc/building.dox b/doc/building.dox index 1bcf0c0a8e..bc35a53fa7 100644 --- a/doc/building.dox +++ b/doc/building.dox @@ -33,9 +33,9 @@ namespace Magnum { Minimal set of tools and libraries required for building is: - C++ compiler with good C++11 support. Currently there are two compilers - which are tested to have everything needed: **GCC** >= 4.6 and **Clang** - >= 3.1. On Windows you can use **MinGW**. GCC 4.5, 4.4 and **MSVC** 2013 - support involves some ugly workarounds and thus is available only in + which are tested to have everything needed: **GCC** >= 4.7 and **Clang** + >= 3.1. On Windows you can use **MinGW**. GCC 4.6, 4.5, 4.4 and **MSVC** + 2013 support involves some ugly workarounds and thus is available only in `compatibility` branch. - **CMake** >= 2.8.8 - **Corrade** - Plugin management and utility library. See @@ -493,7 +493,7 @@ or `update-job`). Build is done using **Ninja** build system and everything possible is enabled, thus you need also **SDL2**, **GLUT** and **OpenAL** libraries. It expects that -**GCC** >=4.8.2, 4.7, 4.6 and **Clang** are installed and there are **OpenGL**, +**GCC** >=4.8.2, 4.7 and **Clang** are installed and there are **OpenGL**, **OpenGL ES 2.0** and **OpenGL ES 3.0** librares as it tries to compile the library with every combination of them. You can add/remove the axes in `axes/hudson.matrix.TextAxis` or via the web interface later. diff --git a/doc/portability.dox b/doc/portability.dox index 578d0fa462..ce9138c4b0 100644 --- a/doc/portability.dox +++ b/doc/portability.dox @@ -70,7 +70,7 @@ for more information. Each feature is marked accordingly if it is not available on some compilers, see @ref SceneGraph::DrawableGroup3D for an example. It is up to you (or your -platform) which compiler your code will support, code written for e.g. GCC 4.6 +platform) which compiler your code will support, code written for e.g. GCC 4.7 will work also on Magnum compiled with support for newer compilers, although newer compilers may catch errors that weren't spotted by earlier versions. diff --git a/package/archlinux/PKGBUILD-gcc46 b/package/archlinux/PKGBUILD-gcc46 deleted file mode 100644 index a3a545de78..0000000000 --- a/package/archlinux/PKGBUILD-gcc46 +++ /dev/null @@ -1,56 +0,0 @@ -# Author: mosra -pkgname=magnum -pkgver=dev.gcc46 -pkgrel=1 -pkgdesc="C++11 and OpenGL 2D/3D graphics engine (built with GCC 4.6)" -arch=('i686' 'x86_64') -url="http://mosra.cz/blog/magnum.php" -license=('MIT') -depends=('corrade' 'openal' 'freeglut' 'sdl2') -makedepends=('cmake' 'ninja' 'gcc46') -options=('!strip' 'staticlibs') -provides=('magnum-git') - -build() { - if [ ! -d "$startdir/build-gcc46" ] ; then - mkdir "$startdir/build-gcc46" - cd "$startdir/build-gcc46" - - cmake .. \ - -DCMAKE_CXX_COMPILER=g++-4.6 \ - -G Ninja - fi - - cd "$startdir/build-gcc46" - - cmake .. \ - -DCMAKE_BUILD_TYPE=Debug \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DWITH_AUDIO=ON \ - -DWITH_GLUTAPPLICATION=ON \ - -DWITH_GLXAPPLICATION=ON \ - -DWITH_SDL2APPLICATION=ON \ - -DWITH_WINDOWLESSGLXAPPLICATION=ON \ - -DWITH_MAGNUMFONT=ON \ - -DWITH_MAGNUMFONTCONVERTER=ON \ - -DWITH_OBJIMPORTER=ON \ - -DWITH_TGAIMAGECONVERTER=ON \ - -DWITH_TGAIMPORTER=ON \ - -DWITH_WAVAUDIOIMPORTER=ON \ - -DWITH_DISTANCEFIELDCONVERTER=ON \ - -DWITH_FONTCONVERTER=ON \ - -DWITH_MAGNUMINFO=ON \ - -DBUILD_TESTS=ON \ - -DBUILD_GL_TESTS=ON - ninja -} - -check() { - cd "$startdir/build-gcc46" - ctest --output-on-failure -j5 -} - -package() { - cd "$startdir/build-gcc46" - DESTDIR="$pkgdir/" ninja install -} diff --git a/package/ci/jenkins-gltests.xml b/package/ci/jenkins-gltests.xml index df9c6b0f9c..ee13c60d80 100644 --- a/package/ci/jenkins-gltests.xml +++ b/package/ci/jenkins-gltests.xml @@ -52,7 +52,6 @@ g++ g++-4.7 - g++-4.6 clang++ clang++-libc++ diff --git a/package/ci/jenkins.xml b/package/ci/jenkins.xml index b8038faafa..8e82dfc361 100644 --- a/package/ci/jenkins.xml +++ b/package/ci/jenkins.xml @@ -54,7 +54,6 @@ g++ g++-4.7 - g++-4.6 clang++ clang++-libc++ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c4f63568b0..f84d09fb64 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -23,13 +23,6 @@ # DEALINGS IN THE SOFTWARE. # -# Disable `-pedantic` for GCC 4.6, as the compiler doesn't like -# list-initialization of array of classes (RectangularMatrix constructors). It -# is perfectly legal C++11 and both GCC 4.7 and Clang accept it without notice. -if(CORRADE_GCC46_COMPATIBILITY) - string(REPLACE "-pedantic" "" CORRADE_CXX_FLAGS "${CORRADE_CXX_FLAGS}") -endif() - # On 4.8.2 strict aliasing causes failure of DebugToolsCylinderRendererTest # without any warning, only in release build, any attempt to add debug print # results in issue disappearing. Not an issue on Clang or GCC < 4.8. diff --git a/src/Magnum/Array.h b/src/Magnum/Array.h index 4a6c5d4c97..a4293d56fb 100644 --- a/src/Magnum/Array.h +++ b/src/Magnum/Array.h @@ -73,13 +73,7 @@ template class Array { #ifdef DOXYGEN_GENERATING_OUTPUT constexpr /*implicit*/ Array(T value); #else - #ifndef CORRADE_GCC46_COMPATIBILITY template::value && dimensions != 1, T>::type> constexpr /*implicit*/ Array(U value): Array(typename Math::Implementation::GenerateSequence::Type(), value) {} - #else - template::value && dimensions != 1, T>::type> /*implicit*/ Array(U value) { - *this = Array(typename Math::Implementation::GenerateSequence::Type(), value); - } - #endif #endif /** @brief Equality */ diff --git a/src/Magnum/Context.cpp b/src/Magnum/Context.cpp index 7a2eaf812a..a9661133ad 100644 --- a/src/Magnum/Context.cpp +++ b/src/Magnum/Context.cpp @@ -424,11 +424,7 @@ Context::Context() { std::unordered_map futureExtensions; for(std::size_t i = future; i != versions.size(); ++i) for(const Extension& extension: Extension::extensions(versions[i])) - #ifndef CORRADE_GCC46_COMPATIBILITY futureExtensions.emplace(extension._string, extension); - #else - futureExtensions.insert({extension._string, extension}); - #endif /* Check for presence of future and vendor extensions */ const std::vector extensions = extensionStrings(); diff --git a/src/Magnum/DebugTools/ForceRenderer.cpp b/src/Magnum/DebugTools/ForceRenderer.cpp index dd785c12fe..8b5b40e77e 100644 --- a/src/Magnum/DebugTools/ForceRenderer.cpp +++ b/src/Magnum/DebugTools/ForceRenderer.cpp @@ -41,23 +41,14 @@ template ResourceKey shaderKey(); template<> inline ResourceKey shaderKey<2>() { return ResourceKey("FlatShader2D"); } template<> inline ResourceKey shaderKey<3>() { return ResourceKey("FlatShader3D"); } -/** @bug Why this is not constexpr under GCC 4.6? */ -#ifndef CORRADE_GCC46_COMPATIBILITY constexpr std::array positions{{ -#else -const std::array positions{{ -#endif {0.0f, 0.0f}, {1.0f, 0.0f}, {0.9f, 0.1f}, {0.9f, -0.1f} }}; -#ifndef CORRADE_GCC46_COMPATIBILITY constexpr std::array indices{{ -#else -const std::array indices{{ -#endif 0, 1, 1, 2, 1, 3 diff --git a/src/Magnum/DebugTools/Implementation/AxisAlignedBoxRenderer.h b/src/Magnum/DebugTools/Implementation/AxisAlignedBoxRenderer.h index 1fd1b9a1a7..df337caf2d 100644 --- a/src/Magnum/DebugTools/Implementation/AxisAlignedBoxRenderer.h +++ b/src/Magnum/DebugTools/Implementation/AxisAlignedBoxRenderer.h @@ -25,8 +25,6 @@ DEALINGS IN THE SOFTWARE. */ -#include - #include "Magnum/Shapes/Shapes.h" #include "AbstractBoxRenderer.h" diff --git a/src/Magnum/DebugTools/Implementation/BoxRenderer.h b/src/Magnum/DebugTools/Implementation/BoxRenderer.h index 8d33f3a1fa..5e59912ac7 100644 --- a/src/Magnum/DebugTools/Implementation/BoxRenderer.h +++ b/src/Magnum/DebugTools/Implementation/BoxRenderer.h @@ -25,8 +25,6 @@ DEALINGS IN THE SOFTWARE. */ -#include - #include "Magnum/Shapes/Shapes.h" #include "AbstractBoxRenderer.h" diff --git a/src/Magnum/DebugTools/Implementation/CapsuleRenderer.h b/src/Magnum/DebugTools/Implementation/CapsuleRenderer.h index 1be24d538a..53dd86fb5d 100644 --- a/src/Magnum/DebugTools/Implementation/CapsuleRenderer.h +++ b/src/Magnum/DebugTools/Implementation/CapsuleRenderer.h @@ -25,8 +25,6 @@ DEALINGS IN THE SOFTWARE. */ -#include - #include "Magnum/Shapes/Shapes.h" #include "AbstractShapeRenderer.h" diff --git a/src/Magnum/DebugTools/Implementation/CylinderRenderer.h b/src/Magnum/DebugTools/Implementation/CylinderRenderer.h index 88f85eee23..581410c4b5 100644 --- a/src/Magnum/DebugTools/Implementation/CylinderRenderer.h +++ b/src/Magnum/DebugTools/Implementation/CylinderRenderer.h @@ -25,8 +25,6 @@ DEALINGS IN THE SOFTWARE. */ -#include - #include "Magnum/Shapes/Shapes.h" #include "AbstractShapeRenderer.h" diff --git a/src/Magnum/DebugTools/Implementation/LineSegmentRenderer.h b/src/Magnum/DebugTools/Implementation/LineSegmentRenderer.h index 01ef6f09f3..7017ecefa4 100644 --- a/src/Magnum/DebugTools/Implementation/LineSegmentRenderer.h +++ b/src/Magnum/DebugTools/Implementation/LineSegmentRenderer.h @@ -25,8 +25,6 @@ DEALINGS IN THE SOFTWARE. */ -#include - #include "Magnum/Shapes/Shapes.h" #include "AbstractShapeRenderer.h" diff --git a/src/Magnum/DebugTools/Implementation/PointRenderer.h b/src/Magnum/DebugTools/Implementation/PointRenderer.h index fdde4278d4..38c6f2a8f0 100644 --- a/src/Magnum/DebugTools/Implementation/PointRenderer.h +++ b/src/Magnum/DebugTools/Implementation/PointRenderer.h @@ -25,8 +25,6 @@ DEALINGS IN THE SOFTWARE. */ -#include - #include "Magnum/Shapes/Shapes.h" #include "AbstractShapeRenderer.h" diff --git a/src/Magnum/DebugTools/Implementation/SphereRenderer.h b/src/Magnum/DebugTools/Implementation/SphereRenderer.h index e90455b120..e82ba874e4 100644 --- a/src/Magnum/DebugTools/Implementation/SphereRenderer.h +++ b/src/Magnum/DebugTools/Implementation/SphereRenderer.h @@ -25,8 +25,6 @@ DEALINGS IN THE SOFTWARE. */ -#include - #include "Magnum/Shapes/Shapes.h" #include "AbstractShapeRenderer.h" diff --git a/src/Magnum/Magnum.h b/src/Magnum/Magnum.h index ab7c7b81d7..77a5516971 100644 --- a/src/Magnum/Magnum.h +++ b/src/Magnum/Magnum.h @@ -49,7 +49,6 @@ namespace Math { /** @todoc Remove `ifndef` when Doxygen is able to handle operator"" */ #ifndef DOXYGEN_GENERATING_OUTPUT - #ifndef CORRADE_GCC46_COMPATIBILITY #ifndef MAGNUM_TARGET_GLES constexpr Rad operator "" _rad(long double); constexpr Deg operator "" _deg(long double); @@ -57,7 +56,6 @@ namespace Math { constexpr Rad operator "" _radf(long double); constexpr Deg operator "" _degf(long double); #endif - #endif } /* Bring whole Corrade namespace */ @@ -228,11 +226,7 @@ typedef Math::Matrix3 Matrix3; typedef Math::Matrix4 Matrix4; /** @brief 2x2 float matrix */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef Math::Matrix2x2 Matrix2x2; -#else -typedef Math::Matrix<2, Float> Matrix2x2; -#endif /** @brief 3x3 float matrix @@ -240,11 +234,7 @@ typedef Math::Matrix<2, Float> Matrix2x2; Note that this is different from @ref Matrix3, which contains additional functions for transformations in 2D. */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef Math::Matrix3x3 Matrix3x3; -#else -typedef Math::Matrix<3, Float> Matrix3x3; -#endif /** @brief 4x4 float matrix @@ -252,53 +242,25 @@ typedef Math::Matrix<3, Float> Matrix3x3; Note that this is different from @ref Matrix4, which contains additional functions for transformations in 3D. */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef Math::Matrix4x4 Matrix4x4; -#else -typedef Math::Matrix<4, Float> Matrix4x4; -#endif /** @brief Float matrix with 2 columns and 3 rows */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef Math::Matrix2x3 Matrix2x3; -#else -typedef Math::RectangularMatrix<2, 3, Float> Matrix2x3; -#endif /** @brief Float matrix with 3 columns and 2 rows */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef Math::Matrix3x2 Matrix3x2; -#else -typedef Math::RectangularMatrix<3, 2, Float> Matrix3x2; -#endif /** @brief Float matrix with 2 columns and 4 rows */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef Math::Matrix2x4 Matrix2x4; -#else -typedef Math::RectangularMatrix<2, 4, Float> Matrix2x4; -#endif /** @brief Float matrix with 4 columns and 2 rows */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef Math::Matrix4x2 Matrix4x2; -#else -typedef Math::RectangularMatrix<4, 2, Float> Matrix4x2; -#endif /** @brief Float matrix with 3 columns and 4 rows */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef Math::Matrix3x4 Matrix3x4; -#else -typedef Math::RectangularMatrix<3, 4, Float> Matrix3x4; -#endif /** @brief Float matrix with 4 columns and 3 rows */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef Math::Matrix4x3 Matrix4x3; -#else -typedef Math::RectangularMatrix<4, 3, Float> Matrix4x3; -#endif /** @brief Float complex number */ typedef Math::Complex Complex; @@ -322,11 +284,7 @@ typedef Math::Deg Deg; typedef Math::Rad Rad; /** @brief Float 1D range */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef Math::Range1D Range1D; -#else -typedef Math::Range<1, Float> Range1D; -#endif /** @brief Float 2D range */ typedef Math::Range2D Range2D; @@ -335,11 +293,7 @@ typedef Math::Range2D Range2D; typedef Math::Range3D Range3D; /** @brief Signed integer 1D range */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef Math::Range1D Range1Di; -#else -typedef Math::Range<1, Int> Range1Di; -#endif /** @brief Signed integer 2D range */ typedef Math::Range2D Range2Di; @@ -397,11 +351,7 @@ typedef Math::Matrix3 Matrix3d; typedef Math::Matrix4 Matrix4d; /** @brief 2x2 double matrix */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef Math::Matrix2x2 Matrix2x2d; -#else -typedef Math::Matrix<2, Double> Matrix2x2d; -#endif /** @brief 3x3 double matrix @@ -409,11 +359,7 @@ typedef Math::Matrix<2, Double> Matrix2x2d; Note that this is different from @ref Matrix3d, which contains additional functions for transformations in 2D. */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef Math::Matrix3x3 Matrix3x3d; -#else -typedef Math::Matrix<3, Double> Matrix3x3d; -#endif /** @brief 4x4 double matrix @@ -421,53 +367,25 @@ typedef Math::Matrix<3, Double> Matrix3x3d; Note that this is different from @ref Matrix4d, which contains additional functions for transformations in 3D. */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef Math::Matrix4x4 Matrix4x4d; -#else -typedef Math::Matrix<4, Double> Matrix4x4d; -#endif /** @brief Double matrix with 2 columns and 3 rows */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef Math::Matrix2x3 Matrix2x3d; -#else -typedef Math::RectangularMatrix<2, 3, Double> Matrix2x3d; -#endif /** @brief Double matrix with 3 columns and 2 rows */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef Math::Matrix3x2 Matrix3x2d; -#else -typedef Math::RectangularMatrix<3, 2, Double> Matrix3x2d; -#endif /** @brief Double matrix with 2 columns and 4 rows */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef Math::Matrix2x4 Matrix2x4d; -#else -typedef Math::RectangularMatrix<2, 4, Double> Matrix2x4d; -#endif /** @brief Double matrix with 4 columns and 2 rows */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef Math::Matrix4x2 Matrix4x2d; -#else -typedef Math::RectangularMatrix<4, 2, Double> Matrix4x2d; -#endif /** @brief Double matrix with 3 columns and 4 rows */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef Math::Matrix3x4 Matrix3x4d; -#else -typedef Math::RectangularMatrix<3, 4, Double> Matrix3x4d; -#endif /** @brief Double matrix with 4 columns and 3 rows */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef Math::Matrix4x3 Matrix4x3d; -#else -typedef Math::RectangularMatrix<4, 3, Double> Matrix4x3d; -#endif /** @brief Double complex number */ typedef Math::Complex Complexd; @@ -491,11 +409,7 @@ typedef Math::Deg Degd; typedef Math::Rad Radd; /** @brief Double 1D range */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef Math::Range1D Range1Dd; -#else -typedef Math::Range<1, Double> Range1Dd; -#endif /** @brief Double 2D range */ typedef Math::Range2D Range2Dd; @@ -514,7 +428,6 @@ typedef CORRADE_DEPRECATED("use Range2Dd instead") Math::Geometry::Rectangle class Deg: public Unit { constexpr /*implicit*/ Deg(Unit value); }; -#ifndef CORRADE_GCC46_COMPATIBILITY #ifndef MAGNUM_TARGET_GLES /** @relates Deg @brief Double-precision degree value literal @@ -157,7 +156,6 @@ Double cosine = Math::cos(60.0_deg); // cosine = 0.5 Double cosine = Math::cos(1.047_rad); // cosine = 0.5 @endcode @see Magnum::operator""_deg(), operator""_degf(), operator""_rad() -@note Not available on GCC < 4.7. Use @ref Deg::Deg(T) instead. @requires_gl Only single-precision types are available in OpenGL ES. @todoc Make references explicit when Doxygen can link to operator"" */ @@ -173,12 +171,10 @@ Float tangent = Math::tan(60.0_degf); // tangent = 1.732f Float tangent = Math::tan(1.047_radf); // tangent = 1.732f @endcode @see Magnum::operator""_degf(), operator""_deg(), operator""_radf() -@note Not available on GCC < 4.7. Use @ref Deg::Deg(T) instead. @requires_gl Only single-precision types are available in OpenGL ES. @todoc Make references explicit when Doxygen can link to operator"" */ constexpr Deg operator "" _degf(long double value) { return Deg(value); } -#endif /** @brief Angle in radians @@ -211,14 +207,12 @@ template class Rad: public Unit { constexpr /*implicit*/ Rad(Unit value); }; -#ifndef CORRADE_GCC46_COMPATIBILITY #ifndef MAGNUM_TARGET_GLES /** @relates Rad @brief Double-precision radian value literal See operator""_rad() for more information. @see Magnum::operator""_rad(), operator""_radf(), operator""_deg() -@note Not available on GCC < 4.7. Use @ref Rad::Rad(T) instead. @todoc Make references explicit when Doxygen can link to operator"" */ constexpr Rad operator "" _rad(long double value) { return Rad(value); } @@ -229,11 +223,9 @@ constexpr Rad operator "" _rad(long double value) { return Rad(v See operator""_degf() for more information. @see Magnum::operator""_radf(), operator""_rad(), operator""_degf() -@note Not available on GCC < 4.7. Use @ref Rad::Rad(T) instead. @todoc Make references explicit when Doxygen can link to operator"" */ constexpr Rad operator "" _radf(long double value) { return Rad(value); } -#endif template constexpr Deg::Deg(Unit value): Unit(T(180)*T(value)/Math::Constants::pi()) {} template constexpr Rad::Rad(Unit value): Unit(T(value)*Math::Constants::pi()/T(180)) {} diff --git a/src/Magnum/Math/BoolVector.h b/src/Magnum/Math/BoolVector.h index 5098858a67..4eee4e7a00 100644 --- a/src/Magnum/Math/BoolVector.h +++ b/src/Magnum/Math/BoolVector.h @@ -87,13 +87,7 @@ template class BoolVector { #ifdef DOXYGEN_GENERATING_OUTPUT inline explicit BoolVector(T value); #else - #ifndef CORRADE_GCC46_COMPATIBILITY template::value && size != 1, bool>::type> constexpr explicit BoolVector(T value): BoolVector(typename Implementation::GenerateSequence::Type(), value ? FullSegmentMask : 0) {} - #else - template::value && size != 1, bool>::type> explicit BoolVector(T value) { - *this = BoolVector(typename Implementation::GenerateSequence::Type(), value ? FullSegmentMask : 0); - } - #endif #endif /** @brief Copy constructor */ diff --git a/src/Magnum/Math/Math.h b/src/Magnum/Math/Math.h index a9acb5c953..6969d04fe4 100644 --- a/src/Magnum/Math/Math.h +++ b/src/Magnum/Math/Math.h @@ -46,11 +46,9 @@ template class DualComplex; template class DualQuaternion; template class Matrix; -#ifndef CORRADE_GCC46_COMPATIBILITY template using Matrix2x2 = Matrix<2, T>; template using Matrix3x3 = Matrix<3, T>; template using Matrix4x4 = Matrix<4, T>; -#endif template class Matrix3; template class Matrix4; @@ -58,14 +56,12 @@ template class Matrix4; template class Quaternion; template class RectangularMatrix; -#ifndef CORRADE_GCC46_COMPATIBILITY template using Matrix2x3 = RectangularMatrix<2, 3, T>; template using Matrix3x2 = RectangularMatrix<3, 2, T>; template using Matrix2x4 = RectangularMatrix<2, 4, T>; template using Matrix4x2 = RectangularMatrix<4, 2, T>; template using Matrix3x4 = RectangularMatrix<3, 4, T>; template using Matrix4x3 = RectangularMatrix<4, 3, T>; -#endif template class, class> class Unit; template class Deg; @@ -77,9 +73,7 @@ template class Vector3; template class Vector4; template class Range; -#ifndef CORRADE_GCC46_COMPATIBILITY template using Range1D = Range<1, T>; -#endif template class Range2D; template class Range3D; diff --git a/src/Magnum/Math/Matrix.h b/src/Magnum/Math/Matrix.h index 7e152f55f7..ec8a7372b9 100644 --- a/src/Magnum/Math/Matrix.h +++ b/src/Magnum/Math/Matrix.h @@ -71,14 +71,7 @@ template class Matrix: public RectangularMatrix(typename Implementation::GenerateSequence::Type(), - /* The original one is not constexpr under GCC 4.6 */ - #ifndef CORRADE_GCC46_COMPATIBILITY - Vector(value) - #else - Vector(typename Implementation::GenerateSequence::Type(), value) - #endif - ) {} + constexpr /*implicit*/ Matrix(IdentityType = Identity, T value = T(1)): RectangularMatrix(typename Implementation::GenerateSequence::Type(), Vector(value)) {} /** * @brief %Matrix from column vectors @@ -188,13 +181,11 @@ template class Matrix: public RectangularMatrix%Matrix<2, T>. See @ref Matrix for more information. -@note Not available on GCC < 4.7. Use %Matrix<2, T> instead. @see @ref Magnum::Matrix2x2, @ref Magnum::Matrix2x2d */ template using Matrix2x2 = Matrix<2, T>; @@ -205,7 +196,6 @@ template using Matrix2x2 = Matrix<2, T>; Convenience alternative to %Matrix<3, T>. See @ref Matrix for more information. Note that this is different from @ref Matrix3, which contains additional functions for transformations in 2D. -@note Not available on GCC < 4.7. Use %Matrix<3, T> instead. @see @ref Magnum::Matrix3x3, @ref Magnum::Matrix3x3d */ template using Matrix3x3 = Matrix<3, T>; @@ -216,11 +206,9 @@ template using Matrix3x3 = Matrix<3, T>; Convenience alternative to %Matrix<4, T>. See @ref Matrix for more information. Note that this is different from @ref Matrix4, which contains additional functions for transformations in 3D. -@note Not available on GCC < 4.7. Use %Matrix<3, T> instead. @see @ref Magnum::Matrix4x4, @ref Magnum::Matrix4x4d */ template using Matrix4x4 = Matrix<4, T>; -#endif MAGNUM_MATRIX_OPERATOR_IMPLEMENTATION(Matrix) diff --git a/src/Magnum/Math/Range.h b/src/Magnum/Math/Range.h index 6f9fe0b251..8f6c45b1ad 100644 --- a/src/Magnum/Math/Range.h +++ b/src/Magnum/Math/Range.h @@ -185,16 +185,13 @@ template class Range { } #endif -#ifndef CORRADE_GCC46_COMPATIBILITY /** @brief One-dimensional range Convenience alternative to %Range<1, T>. See @ref Range for more information. -@note Not available on GCC < 4.7. Use %Range<1, T> instead. */ template using Range1D = Range<1, T>; -#endif /** @brief Two-dimensional range diff --git a/src/Magnum/Math/RectangularMatrix.h b/src/Magnum/Math/RectangularMatrix.h index 6f1c46f263..0dcd293106 100644 --- a/src/Magnum/Math/RectangularMatrix.h +++ b/src/Magnum/Math/RectangularMatrix.h @@ -130,22 +130,10 @@ template class RectangularMatrix { * // integral == {1, 2, -15, 7} * @endcode */ - #ifndef CORRADE_GCC46_COMPATIBILITY template constexpr explicit RectangularMatrix(const RectangularMatrix& other): RectangularMatrix(typename Implementation::GenerateSequence::Type(), other) {} - #else - template explicit RectangularMatrix(const RectangularMatrix& other) { - *this = RectangularMatrix(typename Implementation::GenerateSequence::Type(), other); - } - #endif /** @brief Construct matrix from external representation */ - #ifndef CORRADE_GCC46_COMPATIBILITY template::from(std::declval()))> constexpr explicit RectangularMatrix(const U& other): RectangularMatrix(Implementation::RectangularMatrixConverter::from(other)) {} - #else - template::from(std::declval()))> explicit RectangularMatrix(const U& other) { - *this = Implementation::RectangularMatrixConverter::from(other); - } - #endif /** @brief Copy constructor */ constexpr RectangularMatrix(const RectangularMatrix&) = default; @@ -155,7 +143,6 @@ template class RectangularMatrix { /** @brief Convert matrix to external representation */ template::to(std::declval>()))> constexpr explicit operator U() const { - /** @bug Why this is not constexpr under GCC 4.6? */ return Implementation::RectangularMatrixConverter::to(*this); } @@ -379,14 +366,11 @@ template class RectangularMatrix { Vector _data[cols]; }; -#ifndef CORRADE_GCC46_COMPATIBILITY /** @brief %Matrix with 2 columns and 3 rows Convenience alternative to %RectangularMatrix<2, 3, T>. See @ref RectangularMatrix for more information. -@note Not available on GCC < 4.7. Use %RectangularMatrix<2, 3, T> - instead. @see @ref Magnum::Matrix2x3, @ref Magnum::Matrix2x3d */ template using Matrix2x3 = RectangularMatrix<2, 3, T>; @@ -396,8 +380,6 @@ template using Matrix2x3 = RectangularMatrix<2, 3, T>; Convenience alternative to %RectangularMatrix<3, 2, T>. See @ref RectangularMatrix for more information. -@note Not available on GCC < 4.7. Use %RectangularMatrix<3, 2, T> - instead. @see @ref Magnum::Matrix3x2, @ref Magnum::Matrix3x2d */ template using Matrix3x2 = RectangularMatrix<3, 2, T>; @@ -407,8 +389,6 @@ template using Matrix3x2 = RectangularMatrix<3, 2, T>; Convenience alternative to %RectangularMatrix<2, 4, T>. See @ref RectangularMatrix for more information. -@note Not available on GCC < 4.7. Use %RectangularMatrix<2, 4, T> - instead. @see @ref Magnum::Matrix2x4, @ref Magnum::Matrix2x4d */ template using Matrix2x4 = RectangularMatrix<2, 4, T>; @@ -418,8 +398,6 @@ template using Matrix2x4 = RectangularMatrix<2, 4, T>; Convenience alternative to %RectangularMatrix<4, 2, T>. See @ref RectangularMatrix for more information. -@note Not available on GCC < 4.7. Use %RectangularMatrix<4, 2, T> - instead. @see @ref Magnum::Matrix4x2, @ref Magnum::Matrix4x2d */ template using Matrix4x2 = RectangularMatrix<4, 2, T>; @@ -429,8 +407,6 @@ template using Matrix4x2 = RectangularMatrix<4, 2, T>; Convenience alternative to %RectangularMatrix<3, 4, T>. See @ref RectangularMatrix for more information. -@note Not available on GCC < 4.7. Use %RectangularMatrix<3, 4, T> - instead. @see @ref Magnum::Matrix3x4, @ref Magnum::Matrix3x4d */ template using Matrix3x4 = RectangularMatrix<3, 4, T>; @@ -440,12 +416,9 @@ template using Matrix3x4 = RectangularMatrix<3, 4, T>; Convenience alternative to %RectangularMatrix<4, 3, T>. See @ref RectangularMatrix for more information. -@note Not available on GCC < 4.7. Use %RectangularMatrix<4, 3, T> - instead. @see @ref Magnum::Matrix4x3, @ref Magnum::Matrix4x3d */ template using Matrix4x3 = RectangularMatrix<4, 3, T>; -#endif /** @relates RectangularMatrix @brief Multiply number with matrix diff --git a/src/Magnum/Math/Test/AngleTest.cpp b/src/Magnum/Math/Test/AngleTest.cpp index 1003b6a955..1fe9a4a014 100644 --- a/src/Magnum/Math/Test/AngleTest.cpp +++ b/src/Magnum/Math/Test/AngleTest.cpp @@ -105,7 +105,6 @@ void AngleTest::construct() { } void AngleTest::literals() { - #ifndef CORRADE_GCC46_COMPATIBILITY #ifndef MAGNUM_TARGET_GLES constexpr auto a = 25.0_deg; CORRADE_VERIFY((std::is_same::value)); @@ -123,9 +122,6 @@ void AngleTest::literals() { constexpr auto n = 3.14_radf; CORRADE_VERIFY((std::is_same::value)); CORRADE_COMPARE(Float(n), 3.14f); - #else - CORRADE_SKIP("User-defined literals are not available on GCC < 4.7."); - #endif } void AngleTest::conversion() { diff --git a/src/Magnum/Math/Test/BoolVectorTest.cpp b/src/Magnum/Math/Test/BoolVectorTest.cpp index decda6395c..42e63f29c2 100644 --- a/src/Magnum/Math/Test/BoolVectorTest.cpp +++ b/src/Magnum/Math/Test/BoolVectorTest.cpp @@ -90,18 +90,10 @@ void BoolVectorTest::constructDefault() { } void BoolVectorTest::constructOneValue() { - #ifndef CORRADE_GCC46_COMPATIBILITY constexpr BoolVector19 a(false); - #else - BoolVector19 a(false); /* not constexpr under GCC < 4.7 */ - #endif CORRADE_COMPARE(a, BoolVector19(0x00, 0x00, 0x00)); - #ifndef CORRADE_GCC46_COMPATIBILITY constexpr BoolVector19 b(true); - #else - BoolVector19 b(true); /* not constexpr under GCC < 4.7 */ - #endif CORRADE_COMPARE(b, BoolVector19(0xff, 0xff, 0x07)); CORRADE_VERIFY(!(std::is_convertible::value)); diff --git a/src/Magnum/Math/Test/Matrix3Test.cpp b/src/Magnum/Math/Test/Matrix3Test.cpp index 768703a74b..2a5c724ff4 100644 --- a/src/Magnum/Math/Test/Matrix3Test.cpp +++ b/src/Magnum/Math/Test/Matrix3Test.cpp @@ -162,10 +162,7 @@ void Matrix3Test::constructConversion() { constexpr Matrix3 a({3.0f, 5.0f, 8.0f}, {4.5f, 4.0f, 7.0f}, {7.9f, -1.0f, 8.0f}); - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Matrix3i b(a); + constexpr Matrix3i b(a); CORRADE_COMPARE(b, Matrix3i({3, 5, 8}, {4, 4, 7}, {7, -1, 8})); @@ -195,10 +192,7 @@ void Matrix3Test::convert() { constexpr Matrix3 c(b); CORRADE_COMPARE(c, b); - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Mat3 d(b); + constexpr Mat3 d(b); for(std::size_t i = 0; i != 9; ++i) CORRADE_COMPARE(d.a[0], a.a[0]); diff --git a/src/Magnum/Math/Test/Matrix4Test.cpp b/src/Magnum/Math/Test/Matrix4Test.cpp index 250576ec40..a22c00f62c 100644 --- a/src/Magnum/Math/Test/Matrix4Test.cpp +++ b/src/Magnum/Math/Test/Matrix4Test.cpp @@ -181,10 +181,7 @@ void Matrix4Test::constructConversion() { {4.5f, 4.0f, 7.0f, 2.0f}, {1.0f, 2.0f, 3.0f, -1.0f}, {7.9f, -1.0f, 8.0f, -1.5f}); - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Matrix4i b(a); + constexpr Matrix4i b(a); CORRADE_COMPARE(b, Matrix4i({3, 5, 8, -3}, {4, 4, 7, 2}, {1, 2, 3, -1}, @@ -219,10 +216,7 @@ void Matrix4Test::convert() { constexpr Matrix4 c(b); CORRADE_COMPARE(c, b); - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Mat4 d(b); + constexpr Mat4 d(b); for(std::size_t i = 0; i != 16; ++i) CORRADE_COMPARE(d.a[i], a.a[i]); diff --git a/src/Magnum/Math/Test/MatrixTest.cpp b/src/Magnum/Math/Test/MatrixTest.cpp index da26fb0bc1..2caf3a2fe4 100644 --- a/src/Magnum/Math/Test/MatrixTest.cpp +++ b/src/Magnum/Math/Test/MatrixTest.cpp @@ -159,10 +159,7 @@ void MatrixTest::constructConversion() { Vector4(4.5f, 4.0f, 7.0f, 2.0f), Vector4(1.0f, 2.0f, 3.0f, -1.0f), Vector4(7.9f, -1.0f, 8.0f, -1.5f)); - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Matrix4x4i b(a); + constexpr Matrix4x4i b(a); CORRADE_COMPARE(b, Matrix4x4i(Vector4i(3, 5, 8, -3), Vector4i(4, 4, 7, 2), Vector4i(1, 2, 3, -1), @@ -195,10 +192,7 @@ void MatrixTest::convert() { constexpr Matrix3x3 c(b); CORRADE_COMPARE(c, b); - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Mat3 d(b); + constexpr Mat3 d(b); for(std::size_t i = 0; i != 9; ++i) CORRADE_COMPARE(d.a[i], a.a[i]); diff --git a/src/Magnum/Math/Test/RangeTest.cpp b/src/Magnum/Math/Test/RangeTest.cpp index 1976d4e750..cdffc4ae3b 100644 --- a/src/Magnum/Math/Test/RangeTest.cpp +++ b/src/Magnum/Math/Test/RangeTest.cpp @@ -65,18 +65,10 @@ class RangeTest: public Corrade::TestSuite::Tester { void configuration(); }; -#ifndef CORRADE_GCC46_COMPATIBILITY typedef Math::Range1D Range1D; -#else -typedef Math::Range<1, Float> Range1D; -#endif typedef Math::Range2D Range2D; typedef Math::Range3D Range3D; -#ifndef CORRADE_GCC46_COMPATIBILITY typedef Math::Range1D Range1Di; -#else -typedef Math::Range<1, Int> Range1Di; -#endif typedef Math::Range2D Range2Di; typedef Math::Range3D Range3Di; typedef Vector2 Vector2i; @@ -140,22 +132,13 @@ void RangeTest::constructConversion() { constexpr Range2D b({1.3f, 2.7f}, {-15.0f, 7.0f}); constexpr Range3D c({1.3f, 2.7f, -1.5f}, {-15.0f, 7.0f, 0.3f}); - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Range1Di d(a); + constexpr Range1Di d(a); CORRADE_COMPARE(d, Range1Di(1, -15)); - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Range2Di e(b); + constexpr Range2Di e(b); CORRADE_COMPARE(e, Range2Di({1, 2}, {-15, 7})); - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Range3Di f(c); + constexpr Range3Di f(c); CORRADE_COMPARE(f, Range3Di({1, 2, -1}, {-15, 7, 0})); /* Implicit conversion is not allowed */ diff --git a/src/Magnum/Math/Test/RectangularMatrixTest.cpp b/src/Magnum/Math/Test/RectangularMatrixTest.cpp index 47ff30c119..e0f524f233 100644 --- a/src/Magnum/Math/Test/RectangularMatrixTest.cpp +++ b/src/Magnum/Math/Test/RectangularMatrixTest.cpp @@ -155,10 +155,7 @@ void RectangularMatrixTest::constructDefault() { void RectangularMatrixTest::constructConversion() { constexpr Matrix2x2 a(Vector2( 1.3f, 2.7f), Vector2(-15.0f, 7.0f)); - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Matrix2x2i b(a); + constexpr Matrix2x2i b(a); CORRADE_COMPARE(b, Matrix2x2i(Vector2i( 1, 2), Vector2i(-15, 7))); @@ -215,16 +212,10 @@ void RectangularMatrixTest::convert() { constexpr Matrix2x3 b(Vector3(1.5f, 2.0f, -3.5f), Vector3(2.0f, -3.1f, 0.4f)); - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Matrix2x3 c(b); + constexpr Matrix2x3 c(b); CORRADE_COMPARE(c, b); - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Mat2x3 d(b); + constexpr Mat2x3 d(b); for(std::size_t i = 0; i != 5; ++i) CORRADE_COMPARE(d.a[i], a.a[i]); diff --git a/src/Magnum/Math/Test/Vector2Test.cpp b/src/Magnum/Math/Test/Vector2Test.cpp index 06fb6cfa93..2f44ea8289 100644 --- a/src/Magnum/Math/Test/Vector2Test.cpp +++ b/src/Magnum/Math/Test/Vector2Test.cpp @@ -113,10 +113,7 @@ void Vector2Test::constructDefault() { } void Vector2Test::constructOneValue() { - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Vector2 a(3.0f); + constexpr Vector2 a(3.0f); CORRADE_COMPARE(a, Vector2(3.0f, 3.0f)); /* Implicit conversion is not allowed */ @@ -125,10 +122,7 @@ void Vector2Test::constructOneValue() { void Vector2Test::constructConversion() { constexpr Vector2 a(1.5f, 2.5f); - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Vector2i b(a); + constexpr Vector2i b(a); CORRADE_COMPARE(b, Vector2i(1, 2)); /* Implicit conversion is not allowed */ @@ -148,10 +142,7 @@ void Vector2Test::convert() { constexpr Vector2 c(a); CORRADE_COMPARE(c, b); - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Vec2 d(b); + constexpr Vec2 d(b); CORRADE_COMPARE(d.x, a.x); CORRADE_COMPARE(d.y, a.y); diff --git a/src/Magnum/Math/Test/Vector3Test.cpp b/src/Magnum/Math/Test/Vector3Test.cpp index b07b18533a..ad987b913a 100644 --- a/src/Magnum/Math/Test/Vector3Test.cpp +++ b/src/Magnum/Math/Test/Vector3Test.cpp @@ -111,10 +111,7 @@ void Vector3Test::constructDefault() { } void Vector3Test::constructOneValue() { - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Vector3 a(-3.0f); + constexpr Vector3 a(-3.0f); CORRADE_COMPARE(a, Vector3(-3.0f, -3.0f, -3.0f)); /* Implicit conversion is not allowed */ @@ -129,10 +126,7 @@ void Vector3Test::constructParts() { void Vector3Test::constructConversion() { constexpr Vector3 a(1.0f, 2.5f, -3.0f); - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Vector3i b(a); + constexpr Vector3i b(a); CORRADE_COMPARE(b, Vector3i(1, 2, -3)); /* Implicit conversion is not allowed */ @@ -152,10 +146,7 @@ void Vector3Test::convert() { constexpr Vector3 c(a); CORRADE_COMPARE(c, b); - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Vec3 d(b); + constexpr Vec3 d(b); CORRADE_COMPARE(d.x, a.x); CORRADE_COMPARE(d.y, a.y); CORRADE_COMPARE(d.z, a.z); diff --git a/src/Magnum/Math/Test/Vector4Test.cpp b/src/Magnum/Math/Test/Vector4Test.cpp index 987286afb0..7a9a3372a5 100644 --- a/src/Magnum/Math/Test/Vector4Test.cpp +++ b/src/Magnum/Math/Test/Vector4Test.cpp @@ -108,10 +108,7 @@ void Vector4Test::constructDefault() { } void Vector4Test::constructOneValue() { - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Vector4 a(4.3f); + constexpr Vector4 a(4.3f); CORRADE_COMPARE(a, Vector4(4.3f, 4.3f, 4.3f, 4.3f)); /* Implicit conversion is not allowed */ @@ -126,10 +123,7 @@ void Vector4Test::constructParts() { void Vector4Test::constructConversion() { constexpr Vector4 a(1.0f, -2.5f, 3.0f, 4.1f); - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Vector4i b(a); + constexpr Vector4i b(a); CORRADE_COMPARE(b, Vector4i(1, -2, 3, 4)); /* Implicit conversion is not allowed */ @@ -149,10 +143,7 @@ void Vector4Test::convert() { constexpr Vector4 c(a); CORRADE_COMPARE(c, b); - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Vec4 d(b); + constexpr Vec4 d(b); CORRADE_COMPARE(d.x, a.x); CORRADE_COMPARE(d.y, a.y); CORRADE_COMPARE(d.z, a.z); diff --git a/src/Magnum/Math/Test/VectorTest.cpp b/src/Magnum/Math/Test/VectorTest.cpp index 2273038264..60a9841068 100644 --- a/src/Magnum/Math/Test/VectorTest.cpp +++ b/src/Magnum/Math/Test/VectorTest.cpp @@ -175,10 +175,7 @@ void VectorTest::constructDefault() { } void VectorTest::constructOneValue() { - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Vector4 a(7.25f); + constexpr Vector4 a(7.25f); CORRADE_COMPARE(a, Vector4(7.25f, 7.25f, 7.25f, 7.25f)); @@ -196,10 +193,7 @@ void VectorTest::constructOneComponent() { void VectorTest::constructConversion() { constexpr Vector4 a(1.3f, 2.7f, -15.0f, 7.0f); - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Vector4i b(a); + constexpr Vector4i b(a); CORRADE_COMPARE(b, Vector4i(1, 2, -15, 7)); @@ -227,16 +221,10 @@ void VectorTest::convert() { constexpr Vec3 a{1.5f, 2.0f, -3.5f}; constexpr Vector3 b(1.5f, 2.0f, -3.5f); - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Vector3 c(b); + constexpr Vector3 c(b); CORRADE_COMPARE(c, b); - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Vec3 d(b); + constexpr Vec3 d(b); CORRADE_COMPARE(d.x, a.x); CORRADE_COMPARE(d.y, a.y); CORRADE_COMPARE(d.z, a.z); diff --git a/src/Magnum/Math/Vector.h b/src/Magnum/Math/Vector.h index 42c916d270..ea2a214cdb 100644 --- a/src/Magnum/Math/Vector.h +++ b/src/Magnum/Math/Vector.h @@ -59,11 +59,6 @@ template class Vector { template friend class Vector; - #ifdef CORRADE_GCC46_COMPATIBILITY - /* So it can call internal constexpr constructor from one value */ - template friend class Matrix; - #endif - public: typedef T Type; /**< @brief Underlying data type */ const static std::size_t Size = size; /**< @brief %Vector size */ @@ -137,13 +132,7 @@ template class Vector { #ifdef DOXYGEN_GENERATING_OUTPUT constexpr explicit Vector(T value); #else - #ifndef CORRADE_GCC46_COMPATIBILITY template::value && size != 1, T>::type> constexpr explicit Vector(U value): Vector(typename Implementation::GenerateSequence::Type(), value) {} - #else - template::value && size != 1, T>::type> explicit Vector(U value) { - *this = Vector(typename Implementation::GenerateSequence::Type(), value); - } - #endif #endif /** @@ -157,22 +146,10 @@ template class Vector { * // integral == {1, 2, -15, 7} * @endcode */ - #ifndef CORRADE_GCC46_COMPATIBILITY template constexpr explicit Vector(const Vector& other): Vector(typename Implementation::GenerateSequence::Type(), other) {} - #else - template explicit Vector(const Vector& other) { - *this = Vector(typename Implementation::GenerateSequence::Type(), other); - } - #endif /** @brief Construct vector from external representation */ - #ifndef CORRADE_GCC46_COMPATIBILITY template::from(std::declval()))> constexpr explicit Vector(const U& other): Vector(Implementation::VectorConverter::from(other)) {} - #else - template::from(std::declval()))> explicit Vector(const U& other) { - *this = Implementation::VectorConverter::from(other); - } - #endif /** @brief Copy constructor */ constexpr Vector(const Vector&) = default; @@ -182,7 +159,6 @@ template class Vector { /** @brief Convert vector to external representation */ template::to(std::declval>()))> constexpr explicit operator U() const { - /** @bug Why this is not constexpr under GCC 4.6? */ return Implementation::VectorConverter::to(*this); } diff --git a/src/Magnum/MeshTools/CombineIndexedArrays.cpp b/src/Magnum/MeshTools/CombineIndexedArrays.cpp index 0de3b868aa..c96749f203 100644 --- a/src/Magnum/MeshTools/CombineIndexedArrays.cpp +++ b/src/Magnum/MeshTools/CombineIndexedArrays.cpp @@ -136,11 +136,7 @@ std::pair, std::vector> combineIndexArrays std::vector newInterleavedArrays; for(std::size_t oldIndex = 0, end = interleavedArrays.size()/stride; oldIndex != end; ++oldIndex) { /* Try to insert new index combination to the map */ - #ifndef CORRADE_GCC46_COMPATIBILITY const auto result = indexCombinations.emplace(oldIndex, indexCombinations.size()); - #else - const auto result = indexCombinations.insert({oldIndex, indexCombinations.size()}); - #endif /* Add the (either new or already existing) index to resulting index array */ combinedIndices.push_back(result.first->second); diff --git a/src/Magnum/MeshTools/RemoveDuplicates.h b/src/Magnum/MeshTools/RemoveDuplicates.h index 4107420cd0..f65f88234a 100644 --- a/src/Magnum/MeshTools/RemoveDuplicates.h +++ b/src/Magnum/MeshTools/RemoveDuplicates.h @@ -131,11 +131,7 @@ template std::vector removeDuplicates(std::vector v((data[i] + moved - min)/epsilon); - #ifndef CORRADE_GCC46_COMPATIBILITY const auto result = table.emplace(v, table.size()); - #else - const auto result = table.insert({v, table.size()}); - #endif /* Add the (either new or already existing) index to index array */ indices.push_back(result.first->second); diff --git a/src/Magnum/MeshTools/Test/TransformTest.cpp b/src/Magnum/MeshTools/Test/TransformTest.cpp index d29d407285..61c43ebf65 100644 --- a/src/Magnum/MeshTools/Test/TransformTest.cpp +++ b/src/Magnum/MeshTools/Test/TransformTest.cpp @@ -51,11 +51,6 @@ TransformTest::TransformTest() { &TransformTest::transformPoints3D}); } -/* GCC < 4.7 doesn't like constexpr here, don't know why */ -#ifdef CORRADE_GCC46_COMPATIBILITY -#define constexpr const -#endif - constexpr static std::array points2D{{ {-3.0f, 4.0f}, { 2.5f, -15.0f} @@ -86,10 +81,6 @@ constexpr static std::array points3DRotatedTranslated{{ {15.0f, 1.5f, 1.5f} }}; -#ifdef CORRADE_GCC46_COMPATIBILITY -#undef constexpr -#endif - void TransformTest::transformVectors2D() { auto matrix = MeshTools::transformVectors(Matrix3::rotation(Deg(90.0f)), points2D); auto complex = MeshTools::transformVectors(Complex::rotation(Deg(90.0f)), points2D); diff --git a/src/Magnum/Platform/Implementation/EglContextHandler.h b/src/Magnum/Platform/Implementation/EglContextHandler.h index 3f1dc51d3f..9ca06a8039 100644 --- a/src/Magnum/Platform/Implementation/EglContextHandler.h +++ b/src/Magnum/Platform/Implementation/EglContextHandler.h @@ -33,8 +33,6 @@ #undef None #undef Complex -#include - #include "Magnum/Magnum.h" #include "Magnum/Platform/AbstractXApplication.h" #include "Magnum/Platform/Implementation/AbstractContextHandler.h" diff --git a/src/Magnum/Platform/Implementation/GlxContextHandler.h b/src/Magnum/Platform/Implementation/GlxContextHandler.h index b033f871a8..96f76bb4fa 100644 --- a/src/Magnum/Platform/Implementation/GlxContextHandler.h +++ b/src/Magnum/Platform/Implementation/GlxContextHandler.h @@ -35,8 +35,6 @@ #undef None #undef Status -#include - #include "Magnum/Platform/AbstractXApplication.h" #include "Magnum/Platform/Implementation/AbstractContextHandler.h" diff --git a/src/Magnum/Platform/NaClApplication.h b/src/Magnum/Platform/NaClApplication.h index 31140b50bf..247b49907f 100644 --- a/src/Magnum/Platform/NaClApplication.h +++ b/src/Magnum/Platform/NaClApplication.h @@ -30,7 +30,6 @@ */ #include -#include #include #include #include diff --git a/src/Magnum/Platform/WindowlessNaClApplication.h b/src/Magnum/Platform/WindowlessNaClApplication.h index a241a8dbd2..c4cddee81f 100644 --- a/src/Magnum/Platform/WindowlessNaClApplication.h +++ b/src/Magnum/Platform/WindowlessNaClApplication.h @@ -30,7 +30,6 @@ */ #include -#include #include #include #include diff --git a/src/Magnum/Platform/magnum-info.cpp b/src/Magnum/Platform/magnum-info.cpp index 1f61d915d7..b71af779c0 100644 --- a/src/Magnum/Platform/magnum-info.cpp +++ b/src/Magnum/Platform/magnum-info.cpp @@ -25,7 +25,6 @@ #include #include -#include #ifdef CORRADE_TARGET_NACL #include #endif @@ -105,9 +104,6 @@ MagnumInfo::MagnumInfo(const Arguments& arguments): Platform::WindowlessApplicat Debug() << "Used application: Platform::WindowlessGlxApplication"; #endif Debug() << "Compilation flags:"; - #ifdef CORRADE_GCC46_COMPATIBILITY - Debug() << " CORRADE_GCC46_COMPATIBILITY"; - #endif #ifdef CORRADE_GCC47_COMPATIBILITY Debug() << " CORRADE_GCC47_COMPATIBILITY"; #endif diff --git a/src/Magnum/ResourceManager.h b/src/Magnum/ResourceManager.h index 83e1662ada..756be7fd81 100644 --- a/src/Magnum/ResourceManager.h +++ b/src/Magnum/ResourceManager.h @@ -528,11 +528,7 @@ template void ResourceManagerData::set(const ResourceKey key, T* con /* Insert it, if not already here */ } else if(it == _data.end()) - #ifndef CORRADE_GCC46_COMPATIBILITY it = _data.emplace(key, Data()).first; - #else - it = _data.insert({key, Data()}).first; - #endif /* Replace previous data */ safeDelete(it->second.data); diff --git a/src/Magnum/SceneGraph/AbstractCamera.h b/src/Magnum/SceneGraph/AbstractCamera.h index 9a6467b37e..19c7477d29 100644 --- a/src/Magnum/SceneGraph/AbstractCamera.h +++ b/src/Magnum/SceneGraph/AbstractCamera.h @@ -163,51 +163,37 @@ template class AbstractCamera: public AbstractF Vector2i _viewport; }; -#ifndef CORRADE_GCC46_COMPATIBILITY /** @brief Base camera for two-dimensional scenes Convenience alternative to %AbstractCamera<2, T>. See @ref AbstractCamera for more information. -@note Not available on GCC < 4.7. Use %AbstractCamera<2, T> instead. @see @ref AbstractCamera2D, @ref AbstractBasicCamera3D */ template using AbstractBasicCamera2D = AbstractCamera<2, T>; -#endif /** @brief Base camera for two-dimensional float scenes @see @ref AbstractCamera3D */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef AbstractBasicCamera2D AbstractCamera2D; -#else -typedef AbstractCamera<2, Float> AbstractCamera2D; -#endif -#ifndef CORRADE_GCC46_COMPATIBILITY /** @brief Base camera for three-dimensional scenes Convenience alternative to %AbstractCamera<3, T>. See @ref AbstractCamera for more information. -@note Not available on GCC < 4.7. Use %AbstractCamera<3, T> instead. @see @ref AbstractCamera3D, @ref AbstractBasicCamera2D */ template using AbstractBasicCamera3D = AbstractCamera<3, T>; -#endif /** @brief Base camera for three-dimensional float scenes @see @ref AbstractCamera2D */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef AbstractBasicCamera3D AbstractCamera3D; -#else -typedef AbstractCamera<3, Float> AbstractCamera3D; -#endif #ifdef CORRADE_TARGET_WINDOWS extern template class MAGNUM_SCENEGRAPH_EXPORT AbstractCamera<2, Float>; diff --git a/src/Magnum/SceneGraph/AbstractFeature.h b/src/Magnum/SceneGraph/AbstractFeature.h index 1bc4aab515..37ca209a73 100644 --- a/src/Magnum/SceneGraph/AbstractFeature.h +++ b/src/Magnum/SceneGraph/AbstractFeature.h @@ -183,14 +183,7 @@ template class AbstractFeature /* This is here to avoid ambiguity with deleted copy constructor when passing `*this` from class subclassing both AbstractFeature and AbstractObject */ - template, U>::value>::type> AbstractFeature(U& object) - #ifndef CORRADE_GCC46_COMPATIBILITY - : AbstractFeature(static_cast&>(object)) {} - #else - { - object.Containers::template LinkedList>::insert(this); - } - #endif + template, U>::value>::type> AbstractFeature(U& object): AbstractFeature(static_cast&>(object)) {} #endif virtual ~AbstractFeature() = 0; @@ -298,51 +291,37 @@ template class AbstractFeature CachedTransformations _cachedTransformations; }; -#ifndef CORRADE_GCC46_COMPATIBILITY /** @brief Base feature for two-dimensional scenes Convenience alternative to %AbstractFeature<2, T>. See @ref AbstractFeature for more information. -@note Not available on GCC < 4.7. Use %AbstractFeature<2, T> instead. @see @ref AbstractFeature2D, @ref AbstractBasicFeature3D */ template using AbstractBasicFeature2D = AbstractFeature<2, T>; -#endif /** @brief Base feature for two-dimensional float scenes @see @ref AbstractFeature3D */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef AbstractBasicFeature2D AbstractFeature2D; -#else -typedef AbstractFeature<2, Float> AbstractFeature2D; -#endif -#ifndef CORRADE_GCC46_COMPATIBILITY /** @brief Base feature for three-dimensional scenes Convenience alternative to %AbstractFeature<3, T>. See @ref AbstractFeature for more information. -@note Not available on GCC < 4.7. Use %AbstractFeature<3, T> instead. @see @ref AbstractFeature3D, @ref AbstractBasicFeature2D */ template using AbstractBasicFeature3D = AbstractFeature<3, T>; -#endif /** @brief Base feature for three-dimensional float scenes @see @ref AbstractFeature2D */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef AbstractBasicFeature3D AbstractFeature3D; -#else -typedef AbstractFeature<3, Float> AbstractFeature3D; -#endif #ifdef CORRADE_TARGET_WINDOWS extern template class MAGNUM_SCENEGRAPH_EXPORT AbstractFeature<2, Float>; diff --git a/src/Magnum/SceneGraph/AbstractGroupedFeature.h b/src/Magnum/SceneGraph/AbstractGroupedFeature.h index e29da8bcb0..5e1c075ac6 100644 --- a/src/Magnum/SceneGraph/AbstractGroupedFeature.h +++ b/src/Magnum/SceneGraph/AbstractGroupedFeature.h @@ -107,14 +107,11 @@ template class AbstractGroupedFe FeatureGroup* _group; }; -#ifndef CORRADE_GCC46_COMPATIBILITY /** @brief Base grouped feature for two-dimensional scenes Convenience alternative to %AbstractGroupedFeature<2, Derived, T>. See @ref AbstractGroupedFeature for more information. -@note Not available on GCC < 4.7. Use %AbstractGroupedFeature<2, Derived, T> - instead. @see @ref AbstractGroupedFeature2D, @ref AbstractBasicGroupedFeature3D */ template using AbstractBasicGroupedFeature2D = AbstractGroupedFeature<2, Derived, T>; @@ -124,8 +121,6 @@ template using AbstractBasicGroupedFeature2D = AbstractG Convenience alternative to %AbstractBasicGroupedFeature2D. See @ref AbstractGroupedFeature for more information. -@note Not available on GCC < 4.7. Use %AbstractGroupedFeature<2, Derived, Float> - instead. @see @ref AbstractGroupedFeature3D */ template using AbstractGroupedFeature2D = AbstractBasicGroupedFeature2D; @@ -135,8 +130,6 @@ template using AbstractGroupedFeature2D = AbstractBasicGroupedFea Convenience alternative to %AbstractGroupedFeature<3, Derived, T>. See @ref AbstractGroupedFeature for more information. -@note Not available on GCC < 4.7. Use %AbstractGroupedFeature<3, Derived, T> - instead. @see @ref AbstractGroupedFeature3D, @ref AbstractBasicGroupedFeature2D */ template using AbstractBasicGroupedFeature3D = AbstractGroupedFeature<3, Derived, T>; @@ -146,12 +139,9 @@ template using AbstractBasicGroupedFeature3D = AbstractG Convenience alternative to %AbstractBasicGroupedFeature3D. See @ref AbstractGroupedFeature for more information. -@note Not available on GCC < 4.7. Use %AbstractGroupedFeature<3, Derived, Float> - instead. @see @ref AbstractGroupedFeature2D */ template using AbstractGroupedFeature3D = AbstractBasicGroupedFeature3D; -#endif }} diff --git a/src/Magnum/SceneGraph/AbstractObject.h b/src/Magnum/SceneGraph/AbstractObject.h index cbb29d74d3..a399f6722d 100644 --- a/src/Magnum/SceneGraph/AbstractObject.h +++ b/src/Magnum/SceneGraph/AbstractObject.h @@ -266,40 +266,30 @@ template class AbstractObject virtual void doSetClean(const std::vector>>& objects) = 0; }; -#ifndef CORRADE_GCC46_COMPATIBILITY /** @brief Base object for two-dimensional scenes Convenience alternative to %AbstractObject<2, T>. See @ref AbstractObject for more information. -@note Not available on GCC < 4.7. Use %AbstractObject<2, T> instead. @see @ref AbstractObject2D, @ref AbstractBasicObject3D */ template using AbstractBasicObject2D = AbstractObject<2, T>; -#endif /** @brief Base object for two-dimensional float scenes @see @ref AbstractObject3D */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef AbstractBasicObject2D AbstractObject2D; -#else -typedef AbstractObject<2, Float> AbstractObject2D; -#endif -#ifndef CORRADE_GCC46_COMPATIBILITY /** @brief Base object for three-dimensional scenes Convenience alternative to %AbstractObject<3, T>. See @ref AbstractObject for more information. -@note Not available on GCC < 4.7. Use %AbstractObject<3, T> instead. @see @ref AbstractObject3D, @ref AbstractBasicObject2D */ template using AbstractBasicObject3D = AbstractObject<3, T>; -#endif /** @brief Base object for three-dimensional float scenes diff --git a/src/Magnum/SceneGraph/AbstractTransformation.h b/src/Magnum/SceneGraph/AbstractTransformation.h index 45c4236f48..9be1d7e560 100644 --- a/src/Magnum/SceneGraph/AbstractTransformation.h +++ b/src/Magnum/SceneGraph/AbstractTransformation.h @@ -97,53 +97,37 @@ enum class TransformationType: UnsignedByte { Local = 0x01 }; -#ifndef CORRADE_GCC46_COMPATIBILITY /** @brief Base transformation for two-dimensional scenes Convenience alternative to %AbstractTransformation<2, T>. See @ref AbstractTransformation for more information. -@note Not available on GCC < 4.7. Use %AbstractTransformation<2, T> - instead. @see @ref AbstractTransformation2D, @ref AbstractBasicTransformation3D */ template using AbstractBasicTransformation2D = AbstractTransformation<2, T>; -#endif /** @brief Base transformation for two-dimensional float scenes @see @ref AbstractTransformation3D */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef AbstractBasicTransformation2D AbstractTransformation2D; -#else -typedef AbstractTransformation<2, Float> AbstractTransformation2D; -#endif -#ifndef CORRADE_GCC46_COMPATIBILITY /** @brief Base transformation for three-dimensional scenes Convenience alternative to %AbstractTransformation<3, T>. See @ref AbstractTransformation for more information. -@note Not available on GCC < 4.7. Use %AbstractTransformation<3, T> - instead. @see @ref AbstractTransformation3D, @ref AbstractBasicTransformation2D */ template using AbstractBasicTransformation3D = AbstractTransformation<3, T>; -#endif /** @brief Base transformation for three-dimensional float scenes @see @ref AbstractTransformation2D */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef AbstractBasicTransformation3D AbstractTransformation3D; -#else -typedef AbstractTransformation<3, Float> AbstractTransformation3D; -#endif #ifdef CORRADE_TARGET_WINDOWS extern template class MAGNUM_SCENEGRAPH_EXPORT AbstractTransformation<2, Float>; diff --git a/src/Magnum/SceneGraph/AbstractTranslation.h b/src/Magnum/SceneGraph/AbstractTranslation.h index 4ccf433d82..21ee3a2970 100644 --- a/src/Magnum/SceneGraph/AbstractTranslation.h +++ b/src/Magnum/SceneGraph/AbstractTranslation.h @@ -82,14 +82,11 @@ class AbstractTranslation: public AbstractTransformation { virtual void doTranslate(const typename DimensionTraits::VectorType& vector, TransformationType type) = 0; }; -#ifndef CORRADE_GCC46_COMPATIBILITY /** @brief Base transformation for two-dimensional scenes supporting translation Convenience alternative to %AbstractTranslation<2, T, TranslationType>. See @ref AbstractTranslation for more information. -@note Not available on GCC < 4.7. Use %AbstractTranslation<2, T, TranslationType> - instead. @see @ref AbstractTranslation2D, @ref AbstractBasicTranslation3D */ #ifdef DOXYGEN_GENERATING_OUTPUT @@ -98,27 +95,19 @@ template template #endif using AbstractBasicTranslation2D = AbstractTranslation<2, T, TranslationType>; -#endif /** @brief Base transformation for two-dimensional float scenes supporting translation @see @ref AbstractTranslation3D */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef AbstractBasicTranslation2D AbstractTranslation2D; -#else -typedef AbstractTranslation<2, Float> AbstractTranslation2D; -#endif -#ifndef CORRADE_GCC46_COMPATIBILITY /** @brief Base transformation for three-dimensional scenes supporting translation Convenience alternative to %AbstractTranslation<3, T, TranslationType>. See @ref AbstractTranslation for more information. -@note Not available on GCC < 4.7. Use %AbstractTranslation<3, T, TranslationType> - instead. @see @ref AbstractTranslation3D, @ref AbstractBasicTranslation2D */ #ifdef DOXYGEN_GENERATING_OUTPUT @@ -127,18 +116,13 @@ template template #endif using AbstractBasicTranslation3D = AbstractTranslation<3, T, TranslationType>; -#endif /** @brief Base transformation for three-dimensional float scenes supporting translation @see @ref AbstractTranslation2D */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef AbstractBasicTranslation3D AbstractTranslation3D; -#else -typedef AbstractTranslation<3, Float> AbstractTranslation3D; -#endif }} diff --git a/src/Magnum/SceneGraph/Animable.h b/src/Magnum/SceneGraph/Animable.h index 67482e468e..50deae1242 100644 --- a/src/Magnum/SceneGraph/Animable.h +++ b/src/Magnum/SceneGraph/Animable.h @@ -336,51 +336,37 @@ template class Animable: public AbstractGrouped UnsignedShort repeats; }; -#ifndef CORRADE_GCC46_COMPATIBILITY /** @brief %Animable for two-dimensional scenes Convenience alternative to %Animable<2, T>. See @ref Animable for more information. -@note Not available on GCC < 4.7. Use %Animable<2, T> instead. @see @ref Animable2D, @ref BasicAnimable3D */ template using BasicAnimable2D = Animable<2, T>; -#endif /** @brief %Animable for two-dimensional float scenes @see @ref Animable3D */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef BasicAnimable2D Animable2D; -#else -typedef Animable<2, Float> Animable2D; -#endif -#ifndef CORRADE_GCC46_COMPATIBILITY /** @brief %Animable for three-dimensional scenes Convenience alternative to %Animable<3, T>. See @ref Animable for more information. -@note Not available on GCC < 4.7. Use %Animable<3, T> instead. @see @ref Animable3D, @ref BasicAnimable2D */ template using BasicAnimable3D = Animable<3, T>; -#endif /** @brief %Animable for three-dimensional float scenes @see @ref Animable2D */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef BasicAnimable3D Animable3D; -#else -typedef Animable<3, Float> Animable3D; -#endif #ifdef CORRADE_TARGET_WINDOWS extern template class MAGNUM_SCENEGRAPH_EXPORT Animable<2, Float>; diff --git a/src/Magnum/SceneGraph/AnimableGroup.h b/src/Magnum/SceneGraph/AnimableGroup.h index 9142c855e2..212068cc40 100644 --- a/src/Magnum/SceneGraph/AnimableGroup.h +++ b/src/Magnum/SceneGraph/AnimableGroup.h @@ -72,51 +72,37 @@ template class AnimableGroup: public FeatureGro bool wakeUp; }; -#ifndef CORRADE_GCC46_COMPATIBILITY /** @brief %Animable group for two-dimensional scenes Convenience alternative to %AnimableGroup<2, T>. See Animable for more information. -@note Not available on GCC < 4.7. Use %AnimableGroup<2, T> instead. @see @ref AnimableGroup2D, @ref BasicAnimableGroup3D */ template using BasicAnimableGroup2D = AnimableGroup<2, T>; -#endif /** @brief %Animable group for two-dimensional float scenes @see @ref AnimableGroup3D */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef BasicAnimableGroup2D AnimableGroup2D; -#else -typedef AnimableGroup<2, Float> AnimableGroup2D; -#endif -#ifndef CORRADE_GCC46_COMPATIBILITY /** @brief %Animable group for three-dimensional scenes Convenience alternative to %AnimableGroup<3, T>. See Animable for more information. -@note Not available on GCC < 4.7. Use %AnimableGroup<3, T> instead. @see @ref AnimableGroup3D, @ref BasicAnimableGroup2D */ template using BasicAnimableGroup3D = AnimableGroup<3, T>; -#endif /** @brief %Animable group for three-dimensional float scenes @see @ref AnimableGroup2D */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef BasicAnimableGroup3D AnimableGroup3D; -#else -typedef AnimableGroup<3, Float> AnimableGroup3D; -#endif #ifdef CORRADE_TARGET_WINDOWS extern template class MAGNUM_SCENEGRAPH_EXPORT AnimableGroup<2, Float>; diff --git a/src/Magnum/SceneGraph/Camera2D.h b/src/Magnum/SceneGraph/Camera2D.h index 7af1401255..8b26d3e75f 100644 --- a/src/Magnum/SceneGraph/Camera2D.h +++ b/src/Magnum/SceneGraph/Camera2D.h @@ -73,12 +73,7 @@ template class BasicCamera2D: public AbstractCamera<2, T> { /* This is here to avoid ambiguity with deleted copy constructor when passing `*this` from class subclassing both BasicCamera2D and AbstractObject */ - template, U>::value>::type> BasicCamera2D(U& object): - #ifndef CORRADE_GCC46_COMPATIBILITY - BasicCamera2D(static_cast&>(object)) {} - #else - AbstractCamera<2, T>(static_cast&>(object)) {} - #endif + template, U>::value>::type> BasicCamera2D(U& object): BasicCamera2D(static_cast&>(object)) {} #endif /** diff --git a/src/Magnum/SceneGraph/Camera3D.h b/src/Magnum/SceneGraph/Camera3D.h index d090127a81..0c2511d83f 100644 --- a/src/Magnum/SceneGraph/Camera3D.h +++ b/src/Magnum/SceneGraph/Camera3D.h @@ -75,12 +75,7 @@ template class BasicCamera3D: public AbstractCamera<3, T> { /* This is here to avoid ambiguity with deleted copy constructor when passing `*this` from class subclassing both BasicCamera3D and AbstractObject */ - template, U>::value>::type> BasicCamera3D(U& object): - #ifndef CORRADE_GCC46_COMPATIBILITY - BasicCamera3D(static_cast&>(object)) {} - #else - AbstractCamera<3, T>(static_cast&>(object)) {} - #endif + template, U>::value>::type> BasicCamera3D(U& object): BasicCamera3D(static_cast&>(object)) {} #endif /** diff --git a/src/Magnum/SceneGraph/Drawable.h b/src/Magnum/SceneGraph/Drawable.h index bb73b1bad4..d900ece413 100644 --- a/src/Magnum/SceneGraph/Drawable.h +++ b/src/Magnum/SceneGraph/Drawable.h @@ -148,20 +148,12 @@ template class Drawable: public AbstractGrouped * If the drawable doesn't belong to any group, returns `nullptr`. */ DrawableGroup* drawables() { - #ifndef CORRADE_GCC46_COMPATIBILITY return AbstractGroupedFeature, T>::group(); - #else - return static_cast*>(AbstractGroupedFeature, T>::group()); - #endif } /** @overload */ const DrawableGroup* drawables() const { - #ifndef CORRADE_GCC46_COMPATIBILITY return AbstractGroupedFeature, T>::group(); - #else - return static_cast*>(AbstractGroupedFeature, T>::group()); - #endif } /** @@ -176,51 +168,37 @@ template class Drawable: public AbstractGrouped virtual void draw(const typename DimensionTraits::MatrixType& transformationMatrix, AbstractCamera& camera) = 0; }; -#ifndef CORRADE_GCC46_COMPATIBILITY /** @brief %Drawable for two-dimensional scenes Convenience alternative to %Drawable<2, T>. See @ref Drawable for more information. -@note Not available on GCC < 4.7. Use %Drawable<2, T> instead. @see @ref Drawable2D, @ref BasicDrawable3D */ template using BasicDrawable2D = Drawable<2, T>; -#endif /** @brief %Drawable for two-dimensional float scenes @see @ref Drawable3D */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef BasicDrawable2D Drawable2D; -#else -typedef Drawable<2, Float> Drawable2D; -#endif -#ifndef CORRADE_GCC46_COMPATIBILITY /** @brief %Drawable for three-dimensional scenes Convenience alternative to %Drawable<3, T>. See @ref Drawable for more information. -@note Not available on GCC < 4.7. Use %Drawable<3, T> instead. @see @ref Drawable3D, @ref BasicDrawable3D */ template using BasicDrawable3D = Drawable<3, T>; -#endif /** @brief %Drawable for three-dimensional float scenes @see @ref Drawable2D */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef BasicDrawable3D Drawable3D; -#else -typedef Drawable<3, Float> Drawable3D; -#endif /** @brief Group of drawables @@ -229,57 +207,39 @@ See @ref Drawable for more information. @see @ref scenegraph, @ref BasicDrawableGroup2D, @ref BasicDrawableGroup3D, @ref DrawableGroup2D, @ref DrawableGroup3D */ -#ifndef CORRADE_GCC46_COMPATIBILITY template using DrawableGroup = FeatureGroup, T>; -#else -template class DrawableGroup: public FeatureGroup, T> {}; -#endif -#ifndef CORRADE_GCC46_COMPATIBILITY /** @brief Group of drawables for two-dimensional scenes Convenience alternative to %DrawableGroup<2, T>. See @ref Drawable for more information. -@note Not available on GCC < 4.7. Use %DrawableGroup<2, T> instead. @see @ref DrawableGroup2D, @ref BasicDrawableGroup3D */ template using BasicDrawableGroup2D = DrawableGroup<2, T>; -#endif /** @brief Group of drawables for two-dimensional float scenes @see @ref DrawableGroup3D */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef BasicDrawableGroup2D DrawableGroup2D; -#else -typedef DrawableGroup<2, Float> DrawableGroup2D; -#endif -#ifndef CORRADE_GCC46_COMPATIBILITY /** @brief Group of drawables for three-dimensional scenes Convenience alternative to %DrawableGroup<3, T>. See @ref Drawable for more information. -@note Not available on GCC < 4.7. Use %DrawableGroup<3, T> instead. @see @ref DrawableGroup3D, @ref BasicDrawableGroup2D */ template using BasicDrawableGroup3D = DrawableGroup<3, T>; -#endif /** @brief Group of drawables for three-dimensional float scenes @see @ref DrawableGroup2D */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef BasicDrawableGroup3D DrawableGroup3D; -#else -typedef DrawableGroup<3, Float> DrawableGroup3D; -#endif #ifdef CORRADE_TARGET_WINDOWS extern template class MAGNUM_SCENEGRAPH_EXPORT Drawable<2, Float>; diff --git a/src/Magnum/SceneGraph/FeatureGroup.h b/src/Magnum/SceneGraph/FeatureGroup.h index 46982149c9..1a0e190ac4 100644 --- a/src/Magnum/SceneGraph/FeatureGroup.h +++ b/src/Magnum/SceneGraph/FeatureGroup.h @@ -113,14 +113,11 @@ template class FeatureGroup: pub FeatureGroup& remove(Feature& feature); }; -#ifndef CORRADE_GCC46_COMPATIBILITY /** @brief Base feature group for two-dimensional scenes Convenience alternative to %FeatureGroup<2, Feature, T>. See @ref AbstractGroupedFeature for more information. -@note Not available on GCC < 4.7. Use %FeatureGroup<2, Feature, T> - instead. @see @ref FeatureGroup2D, @ref BasicFeatureGroup3D */ template using BasicFeatureGroup2D = FeatureGroup<2, Feature, T>; @@ -130,8 +127,6 @@ template using BasicFeatureGroup2D = FeatureGroup<2, Fea Convenience alternative to %BasicFeatureGroup2D. See @ref AbstractGroupedFeature for more information. -@note Not available on GCC < 4.7. Use %FeatureGroup<2, Feature, Float> - instead. @see @ref FeatureGroup3D */ template using FeatureGroup2D = BasicFeatureGroup2D; @@ -141,8 +136,6 @@ template using FeatureGroup2D = BasicFeatureGroup2D%FeatureGroup<3, Feature, T>. See @ref AbstractGroupedFeature for more information. -@note Not available on GCC < 4.7. Use %FeatureGroup<3, Feature, T> - instead. @see @ref FeatureGroup3D, @ref BasicFeatureGroup2D */ template using BasicFeatureGroup3D = FeatureGroup<3, Feature, T>; @@ -152,12 +145,9 @@ template using BasicFeatureGroup3D = FeatureGroup<3, Fea Convenience alternative to %BasicFeatureGroup3D. See @ref AbstractGroupedFeature for more information. -@note Not available on GCC < 4.7. Use %FeatureGroup<3, Feature, Float> - instead. @see @ref FeatureGroup2D */ template using FeatureGroup3D = BasicFeatureGroup3D; -#endif template FeatureGroup::~FeatureGroup() { for(auto i: AbstractFeatureGroup::features) static_cast(i.get())._group = nullptr; diff --git a/src/Magnum/SceneGraph/SceneGraph.h b/src/Magnum/SceneGraph/SceneGraph.h index ba85735370..4d61044a22 100644 --- a/src/Magnum/SceneGraph/SceneGraph.h +++ b/src/Magnum/SceneGraph/SceneGraph.h @@ -29,8 +29,6 @@ * @brief Forward declarations for @ref Magnum::SceneGraph namespace */ -#include - #include "Magnum/Types.h" namespace Magnum { namespace SceneGraph { @@ -38,73 +36,46 @@ namespace Magnum { namespace SceneGraph { enum class AspectRatioPolicy: UnsignedByte; template class AbstractCamera; -#ifndef CORRADE_GCC46_COMPATIBILITY template using AbstractBasicCamera2D = AbstractCamera<2, T>; template using AbstractBasicCamera3D = AbstractCamera<3, T>; typedef AbstractBasicCamera2D AbstractCamera2D; typedef AbstractBasicCamera3D AbstractCamera3D; -#else -typedef AbstractCamera<2, Float> AbstractCamera2D; -typedef AbstractCamera<3, Float> AbstractCamera3D; -#endif /* Enum CachedTransformation and CachedTransformations used only directly */ template class AbstractFeature; -#ifndef CORRADE_GCC46_COMPATIBILITY template using AbstractBasicFeature2D = AbstractFeature<2, T>; template using AbstractBasicFeature3D = AbstractFeature<3, T>; typedef AbstractBasicFeature2D AbstractFeature2D; typedef AbstractBasicFeature3D AbstractFeature3D; -#else -typedef AbstractFeature<2, Float> AbstractFeature2D; -typedef AbstractFeature<3, Float> AbstractFeature3D; -#endif /* AbstractFeatureGroup shouldn't be used directly */ template class AbstractGroupedFeature; -#ifndef CORRADE_GCC46_COMPATIBILITY template using AbstractBasicGroupedFeature2D = AbstractGroupedFeature<2, Derived, T>; template using AbstractBasicGroupedFeature3D = AbstractGroupedFeature<3, Derived, T>; template using AbstractGroupedFeature2D = AbstractBasicGroupedFeature2D; template using AbstractGroupedFeature3D = AbstractBasicGroupedFeature3D; -#endif template class AbstractObject; -#ifndef CORRADE_GCC46_COMPATIBILITY template using AbstractBasicObject2D = AbstractObject<2, T>; template using AbstractBasicObject3D = AbstractObject<3, T>; typedef AbstractBasicObject2D AbstractObject2D; typedef AbstractBasicObject3D AbstractObject3D; -#else -typedef AbstractObject<2, Float> AbstractObject2D; -typedef AbstractObject<3, Float> AbstractObject3D; -#endif enum class TransformationType: UnsignedByte; template class AbstractTransformation; -#ifndef CORRADE_GCC46_COMPATIBILITY template using AbstractBasicTransformation2D = AbstractTransformation<2, T>; template using AbstractBasicTransformation3D = AbstractTransformation<3, T>; typedef AbstractBasicTransformation2D AbstractTransformation2D; typedef AbstractBasicTransformation3D AbstractTransformation3D; -#else -typedef AbstractTransformation<2, Float> AbstractTransformation2D; -typedef AbstractTransformation<3, Float> AbstractTransformation3D; -#endif template class AbstractTranslation; -#ifndef CORRADE_GCC46_COMPATIBILITY template using AbstractBasicTranslation2D = AbstractTranslation<2, T, TranslationType>; template using AbstractBasicTranslation3D = AbstractTranslation<3, T, TranslationType>; typedef AbstractBasicTranslation2D AbstractTranslation2D; typedef AbstractBasicTranslation3D AbstractTranslation3D; -#else -typedef AbstractTranslation<2, Float> AbstractTranslation2D; -typedef AbstractTranslation<3, Float> AbstractTranslation3D; -#endif template class AbstractBasicTranslationRotation2D; template class AbstractBasicTranslationRotation3D; @@ -117,28 +88,18 @@ typedef AbstractBasicTranslationRotationScaling2D AbstractTranslationRota typedef AbstractBasicTranslationRotationScaling3D AbstractTranslationRotationScaling3D; template class Animable; -#ifndef CORRADE_GCC46_COMPATIBILITY template using BasicAnimable2D = Animable<2, T>; template using BasicAnimable3D = Animable<3, T>; typedef BasicAnimable2D Animable2D; typedef BasicAnimable3D Animable3D; -#else -typedef Animable<2, Float> Animable2D; -typedef Animable<3, Float> Animable3D; -#endif enum class AnimationState: UnsignedByte; template class AnimableGroup; -#ifndef CORRADE_GCC46_COMPATIBILITY template using BasicAnimableGroup2D = AnimableGroup<2, T>; template using BasicAnimableGroup3D = AnimableGroup<3, T>; typedef BasicAnimableGroup2D AnimableGroup2D; typedef BasicAnimableGroup3D AnimableGroup3D; -#else -typedef AnimableGroup<2, Float> AnimableGroup2D; -typedef AnimableGroup<3, Float> AnimableGroup3D; -#endif template class BasicCamera2D; template class BasicCamera3D; @@ -146,12 +107,10 @@ typedef BasicCamera2D Camera2D; typedef BasicCamera3D Camera3D; template class Drawable; -#ifndef CORRADE_GCC46_COMPATIBILITY template using BasicDrawable2D = Drawable<2, T>; template using BasicDrawable3D = Drawable<3, T>; typedef BasicDrawable2D Drawable2D; typedef BasicDrawable3D Drawable3D; -#endif template class BasicDualComplexTransformation; template class BasicDualQuaternionTransformation; @@ -159,24 +118,16 @@ typedef BasicDualComplexTransformation DualComplexTransformation; typedef BasicDualQuaternionTransformation DualQuaternionTransformation; template class FeatureGroup; -#ifndef CORRADE_GCC46_COMPATIBILITY template using BasicFeatureGroup2D = FeatureGroup<2, Feature, T>; template using BasicFeatureGroup3D = FeatureGroup<3, Feature, T>; template using FeatureGroup2D = BasicFeatureGroup2D; template using FeatureGroup3D = BasicFeatureGroup3D; -#endif -#ifndef CORRADE_GCC46_COMPATIBILITY template using DrawableGroup = FeatureGroup, T>; template using BasicDrawableGroup2D = DrawableGroup<2, T>; template using BasicDrawableGroup3D = DrawableGroup<3, T>; typedef BasicDrawableGroup2D DrawableGroup2D; typedef BasicDrawableGroup3D DrawableGroup3D; -#else -template class DrawableGroup; -typedef DrawableGroup<2, Float> DrawableGroup2D; -typedef DrawableGroup<3, Float> DrawableGroup3D; -#endif template class BasicMatrixTransformation2D; template class BasicMatrixTransformation3D; @@ -193,15 +144,10 @@ typedef BasicRigidMatrixTransformation3D RigidMatrixTransformation3D; template class Scene; template class TranslationTransformation; -#ifndef CORRADE_GCC46_COMPATIBILITY template using BasicTranslationTransformation2D = TranslationTransformation<2, T, TranslationType>; template using BasicTranslationTransformation3D = TranslationTransformation<3, T, TranslationType>; typedef BasicTranslationTransformation2D TranslationTransformation2D; typedef BasicTranslationTransformation3D TranslationTransformation3D; -#else -typedef TranslationTransformation<2, Float> TranslationTransformation2D; -typedef TranslationTransformation<3, Float> TranslationTransformation3D; -#endif namespace Implementation { template struct Transformation; diff --git a/src/Magnum/SceneGraph/TranslationTransformation.h b/src/Magnum/SceneGraph/TranslationTransformation.h index 600ef2d571..b003469504 100644 --- a/src/Magnum/SceneGraph/TranslationTransformation.h +++ b/src/Magnum/SceneGraph/TranslationTransformation.h @@ -126,14 +126,11 @@ class TranslationTransformation: public AbstractTranslation::VectorType _transformation; }; -#ifndef CORRADE_GCC46_COMPATIBILITY /** @brief Base transformation for two-dimensional scenes supporting translation Convenience alternative to %TranslationTransformation<2, T, TranslationType>. See @ref TranslationTransformation for more information. -@note Not available on GCC < 4.7. Use %TranslationTransformation<2, T, TranslationType> - instead. @see @ref TranslationTransformation2D, @ref BasicTranslationTransformation3D */ #ifdef DOXYGEN_GENERATING_OUTPUT @@ -142,27 +139,19 @@ template template #endif using BasicTranslationTransformation2D = TranslationTransformation<2, T, TranslationType>; -#endif /** @brief Base transformation for two-dimensional float scenes supporting translation @see @ref TranslationTransformation3D */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef BasicTranslationTransformation2D TranslationTransformation2D; -#else -typedef TranslationTransformation<2, Float> TranslationTransformation2D; -#endif -#ifndef CORRADE_GCC46_COMPATIBILITY /** @brief Base transformation for three-dimensional scenes supporting translation Convenience alternative to %TranslationTransformation<3, T, TranslationType>. See @ref TranslationTransformation for more information. -@note Not available on GCC < 4.7. Use %TranslationTransformation<3, T, TranslationType> - instead. @see @ref TranslationTransformation3D, @ref BasicTranslationTransformation2D */ #ifdef DOXYGEN_GENERATING_OUTPUT @@ -171,18 +160,13 @@ template template #endif using BasicTranslationTransformation3D = TranslationTransformation<3, T, TranslationType>; -#endif /** @brief Base transformation for three-dimensional float scenes supporting translation @see @ref TranslationTransformation2D */ -#ifndef CORRADE_GCC46_COMPATIBILITY typedef BasicTranslationTransformation3D TranslationTransformation3D; -#else -typedef TranslationTransformation<3, Float> TranslationTransformation3D; -#endif namespace Implementation { diff --git a/src/Magnum/Shapes/shapeImplementation.h b/src/Magnum/Shapes/shapeImplementation.h index 93a2ef5b0d..afdf89aee2 100644 --- a/src/Magnum/Shapes/shapeImplementation.h +++ b/src/Magnum/Shapes/shapeImplementation.h @@ -26,7 +26,6 @@ */ #include -#include #include #include "Magnum/DimensionTraits.h" diff --git a/src/Magnum/Test/AbstractOpenGLTester.h b/src/Magnum/Test/AbstractOpenGLTester.h index e73d700322..47bf4d6846 100644 --- a/src/Magnum/Test/AbstractOpenGLTester.h +++ b/src/Magnum/Test/AbstractOpenGLTester.h @@ -26,7 +26,6 @@ */ #include -#include #include "Magnum/Context.h" #include "Magnum/Extensions.h" diff --git a/src/Magnum/Test/AbstractQueryGLTest.cpp b/src/Magnum/Test/AbstractQueryGLTest.cpp index 11e1e02453..48b095604e 100644 --- a/src/Magnum/Test/AbstractQueryGLTest.cpp +++ b/src/Magnum/Test/AbstractQueryGLTest.cpp @@ -65,10 +65,7 @@ void AbstractQueryGLTest::construct() { void AbstractQueryGLTest::constructCopy() { CORRADE_VERIFY(!(std::is_constructible{})); - /* GCC 4.6 doesn't have std::is_assignable */ - #ifndef CORRADE_GCC46_COMPATIBILITY CORRADE_VERIFY(!(std::is_assignable{})); - #endif } void AbstractQueryGLTest::constructMove() { diff --git a/src/Magnum/Test/AbstractShaderProgramGLTest.cpp b/src/Magnum/Test/AbstractShaderProgramGLTest.cpp index 153dd8ba6f..d087ebd874 100644 --- a/src/Magnum/Test/AbstractShaderProgramGLTest.cpp +++ b/src/Magnum/Test/AbstractShaderProgramGLTest.cpp @@ -96,10 +96,7 @@ void AbstractShaderProgramGLTest::construct() { void AbstractShaderProgramGLTest::constructCopy() { CORRADE_VERIFY(!(std::is_constructible{})); - /* GCC 4.6 doesn't have std::is_assignable */ - #ifndef CORRADE_GCC46_COMPATIBILITY CORRADE_VERIFY(!(std::is_assignable{})); - #endif } void AbstractShaderProgramGLTest::constructMove() { diff --git a/src/Magnum/Test/AbstractTextureGLTest.cpp b/src/Magnum/Test/AbstractTextureGLTest.cpp index 08df67b1e7..57e5af65b1 100644 --- a/src/Magnum/Test/AbstractTextureGLTest.cpp +++ b/src/Magnum/Test/AbstractTextureGLTest.cpp @@ -62,10 +62,7 @@ void AbstractTextureGLTest::construct() { void AbstractTextureGLTest::constructCopy() { CORRADE_VERIFY(!(std::is_constructible{})); - /* GCC 4.6 doesn't have std::is_assignable */ - #ifndef CORRADE_GCC46_COMPATIBILITY CORRADE_VERIFY(!(std::is_assignable{})); - #endif } void AbstractTextureGLTest::constructMove() { diff --git a/src/Magnum/Test/ArrayTest.cpp b/src/Magnum/Test/ArrayTest.cpp index 724ad84428..658d42ea11 100644 --- a/src/Magnum/Test/ArrayTest.cpp +++ b/src/Magnum/Test/ArrayTest.cpp @@ -52,11 +52,7 @@ void ArrayTest::construct() { constexpr Array<3, Int> a = {5, 6, 7}; CORRADE_COMPARE(a, (Array<3, Int>(5, 6, 7))); - #ifndef CORRADE_GCC46_COMPATIBILITY constexpr Array<3, Int> a2 = 5; - #else - Array<3, Int> a2 = 5; /* Not constexpr under GCC < 4.7 */ - #endif CORRADE_COMPARE(a2, (Array<3, Int>(5, 5, 5))); constexpr Array1D b = 5; diff --git a/src/Magnum/Test/BufferGLTest.cpp b/src/Magnum/Test/BufferGLTest.cpp index e7e04c8de2..58776d116b 100644 --- a/src/Magnum/Test/BufferGLTest.cpp +++ b/src/Magnum/Test/BufferGLTest.cpp @@ -87,10 +87,7 @@ void BufferGLTest::construct() { void BufferGLTest::constructCopy() { CORRADE_VERIFY(!(std::is_constructible{})); - /* GCC 4.6 doesn't have std::is_assignable */ - #ifndef CORRADE_GCC46_COMPATIBILITY CORRADE_VERIFY(!(std::is_assignable{})); - #endif } void BufferGLTest::constructMove() { diff --git a/src/Magnum/Test/BufferImageGLTest.cpp b/src/Magnum/Test/BufferImageGLTest.cpp index 8fdc73a108..ec60b2a21a 100644 --- a/src/Magnum/Test/BufferImageGLTest.cpp +++ b/src/Magnum/Test/BufferImageGLTest.cpp @@ -74,10 +74,7 @@ void BufferImageTest::construct() { void BufferImageTest::constructCopy() { CORRADE_VERIFY(!(std::is_constructible{})); - /* GCC 4.6 doesn't have std::is_assignable */ - #ifndef CORRADE_GCC46_COMPATIBILITY CORRADE_VERIFY(!(std::is_assignable{})); - #endif } void BufferImageTest::constructMove() { diff --git a/src/Magnum/Test/ColorTest.cpp b/src/Magnum/Test/ColorTest.cpp index 933602990e..52d5edbba9 100644 --- a/src/Magnum/Test/ColorTest.cpp +++ b/src/Magnum/Test/ColorTest.cpp @@ -115,10 +115,7 @@ void ColorTest::constructDefault() { } void ColorTest::constructOneValue() { - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Color3 a(0.25f); + constexpr Color3 a(0.25f); CORRADE_COMPARE(a, Color3(0.25f, 0.25f, 0.25f)); constexpr Color4 b(0.25f, 0.5f); @@ -151,17 +148,11 @@ void ColorTest::constructParts() { void ColorTest::constructConversion() { constexpr Color3 a(10.1f, 12.5f, 0.75f); - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Color3ub b(a); + constexpr Color3ub b(a); CORRADE_COMPARE(b, Color3ub(10, 12, 0)); constexpr Color4 c(10.1f, 12.5f, 0.75f, 5.25f); - #ifndef CORRADE_GCC46_COMPATIBILITY - constexpr /* Not constexpr under GCC < 4.7 */ - #endif - Color4ub d(c); + constexpr Color4ub d(c); CORRADE_COMPARE(d, Color4ub(10, 12, 0, 5)); /* Implicit conversion is not allowed */ diff --git a/src/Magnum/Test/FramebufferGLTest.cpp b/src/Magnum/Test/FramebufferGLTest.cpp index 0d617906ae..74537139ca 100644 --- a/src/Magnum/Test/FramebufferGLTest.cpp +++ b/src/Magnum/Test/FramebufferGLTest.cpp @@ -156,10 +156,7 @@ void FramebufferGLTest::construct() { void FramebufferGLTest::constructCopy() { CORRADE_VERIFY(!(std::is_constructible{})); - /* GCC 4.6 doesn't have std::is_assignable */ - #ifndef CORRADE_GCC46_COMPATIBILITY CORRADE_VERIFY(!(std::is_assignable{})); - #endif } void FramebufferGLTest::constructMove() { diff --git a/src/Magnum/Test/ImageTest.cpp b/src/Magnum/Test/ImageTest.cpp index 7cfa435269..b0d86f0317 100644 --- a/src/Magnum/Test/ImageTest.cpp +++ b/src/Magnum/Test/ImageTest.cpp @@ -65,10 +65,7 @@ void ImageTest::construct() { void ImageTest::constructCopy() { CORRADE_VERIFY(!(std::is_constructible{})); - /* GCC 4.6 doesn't have std::is_assignable */ - #ifndef CORRADE_GCC46_COMPATIBILITY CORRADE_VERIFY(!(std::is_assignable{})); - #endif } void ImageTest::constructMove() { diff --git a/src/Magnum/Test/MeshGLTest.cpp b/src/Magnum/Test/MeshGLTest.cpp index bd7c49837f..0de49d3a94 100644 --- a/src/Magnum/Test/MeshGLTest.cpp +++ b/src/Magnum/Test/MeshGLTest.cpp @@ -247,10 +247,7 @@ void MeshGLTest::construct() { void MeshGLTest::constructCopy() { CORRADE_VERIFY(!(std::is_constructible{})); - /* GCC 4.6 doesn't have std::is_assignable */ - #ifndef CORRADE_GCC46_COMPATIBILITY CORRADE_VERIFY(!(std::is_assignable{})); - #endif } void MeshGLTest::constructMove() { diff --git a/src/Magnum/Test/RenderbufferGLTest.cpp b/src/Magnum/Test/RenderbufferGLTest.cpp index 44b85081be..89b54e0bb7 100644 --- a/src/Magnum/Test/RenderbufferGLTest.cpp +++ b/src/Magnum/Test/RenderbufferGLTest.cpp @@ -75,10 +75,7 @@ void RenderbufferGLTest::construct() { void RenderbufferGLTest::constructCopy() { CORRADE_VERIFY(!(std::is_constructible{})); - /* GCC 4.6 doesn't have std::is_assignable */ - #ifndef CORRADE_GCC46_COMPATIBILITY CORRADE_VERIFY(!(std::is_assignable{})); - #endif } void RenderbufferGLTest::constructMove() { diff --git a/src/Magnum/Test/ResourceManagerTest.cpp b/src/Magnum/Test/ResourceManagerTest.cpp index dd79a926a0..e94e85b3c0 100644 --- a/src/Magnum/Test/ResourceManagerTest.cpp +++ b/src/Magnum/Test/ResourceManagerTest.cpp @@ -24,7 +24,6 @@ */ #include -#include #include #include "Magnum/AbstractResourceLoader.h" diff --git a/src/Magnum/Test/ShaderGLTest.cpp b/src/Magnum/Test/ShaderGLTest.cpp index 654b682515..bbb3a7aa29 100644 --- a/src/Magnum/Test/ShaderGLTest.cpp +++ b/src/Magnum/Test/ShaderGLTest.cpp @@ -91,10 +91,7 @@ void ShaderGLTest::constructNoVersion() { void ShaderGLTest::constructCopy() { CORRADE_VERIFY(!(std::is_constructible{})); - /* GCC 4.6 doesn't have std::is_assignable */ - #ifndef CORRADE_GCC46_COMPATIBILITY CORRADE_VERIFY(!(std::is_assignable{})); - #endif } void ShaderGLTest::constructMove() { diff --git a/src/Magnum/Trade/Test/ImageDataTest.cpp b/src/Magnum/Trade/Test/ImageDataTest.cpp index 02e7317af8..ff2e21c256 100644 --- a/src/Magnum/Trade/Test/ImageDataTest.cpp +++ b/src/Magnum/Trade/Test/ImageDataTest.cpp @@ -63,10 +63,7 @@ void ImageDataTest::construct() { void ImageDataTest::constructCopy() { CORRADE_VERIFY(!(std::is_constructible{})); - /* GCC 4.6 doesn't have std::is_assignable */ - #ifndef CORRADE_GCC46_COMPATIBILITY CORRADE_VERIFY(!(std::is_assignable{})); - #endif } void ImageDataTest::constructMove() { diff --git a/src/MagnumPlugins/MagnumFont/MagnumFont.cpp b/src/MagnumPlugins/MagnumFont/MagnumFont.cpp index 577da81162..acc8f17994 100644 --- a/src/MagnumPlugins/MagnumFont/MagnumFont.cpp +++ b/src/MagnumPlugins/MagnumFont/MagnumFont.cpp @@ -37,10 +37,6 @@ namespace Magnum { namespace Text { struct MagnumFont::Data { - #ifdef CORRADE_GCC46_COMPATIBILITY - explicit Data(Utility::Configuration&& conf, Trade::ImageData2D&& image, std::unordered_map&& glyphId, std::vector&& glyphAdvance): conf(std::move(conf)), image(std::move(image)), glyphId(std::move(glyphId)), glyphAdvance(std::move(glyphAdvance)) {} - #endif - Utility::Configuration conf; Trade::ImageData2D image; std::unordered_map glyphId; @@ -162,11 +158,7 @@ std::pair MagnumFont::openInternal(Utility::Configuration&& conf, for(const Utility::ConfigurationGroup* const c: chars) { const UnsignedInt glyphId = c->value("glyph"); CORRADE_INTERNAL_ASSERT(glyphId < _opened->glyphAdvance.size()); - #ifndef CORRADE_GCC46_COMPATIBILITY _opened->glyphId.emplace(c->value("unicode"), glyphId); - #else - _opened->glyphId.insert({c->value("unicode"), glyphId}); - #endif } return {_opened->conf.value("fontSize"), _opened->conf.value("lineHeight")}; diff --git a/src/MagnumPlugins/MagnumFontConverter/MagnumFontConverter.cpp b/src/MagnumPlugins/MagnumFontConverter/MagnumFontConverter.cpp index e3c709c735..798649b5a8 100644 --- a/src/MagnumPlugins/MagnumFontConverter/MagnumFontConverter.cpp +++ b/src/MagnumPlugins/MagnumFontConverter/MagnumFontConverter.cpp @@ -64,17 +64,9 @@ std::vector>> MagnumFont should stay at position 0 */ std::unordered_map glyphIdMap; glyphIdMap.reserve(cache.glyphCount()); - #ifndef CORRADE_GCC46_COMPATIBILITY glyphIdMap.emplace(0, 0); - #else - glyphIdMap.insert({0, 0}); - #endif for(const std::pair>& glyph: cache) - #ifndef CORRADE_GCC46_COMPATIBILITY glyphIdMap.emplace(glyph.first, glyphIdMap.size()); - #else - glyphIdMap.insert({glyph.first, glyphIdMap.size()}); - #endif /** @todo Save only glyphs contained in @p characters */ diff --git a/src/MagnumPlugins/ObjImporter/ObjImporter.cpp b/src/MagnumPlugins/ObjImporter/ObjImporter.cpp index 78a866b494..d412d98c54 100644 --- a/src/MagnumPlugins/ObjImporter/ObjImporter.cpp +++ b/src/MagnumPlugins/ObjImporter/ObjImporter.cpp @@ -175,11 +175,7 @@ void ObjImporter::parseMeshNames() { /* Update its name and add it to name map */ if(!name.empty()) - #ifndef CORRADE_GCC46_COMPATIBILITY _file->meshesForName.emplace(name, _file->meshes.size() - 1); - #else - _file->meshesForName.insert({name, _file->meshes.size() - 1}); - #endif _file->meshNames.back() = std::move(name); /* Update its begin offset to be more precise */ @@ -193,11 +189,7 @@ void ObjImporter::parseMeshNames() { /* Save name and offset of the new one. The end offset will be updated later. */ if(!name.empty()) - #ifndef CORRADE_GCC46_COMPATIBILITY _file->meshesForName.emplace(name, _file->meshes.size()); - #else - _file->meshesForName.insert({name, _file->meshes.size()}); - #endif _file->meshNames.emplace_back(std::move(name)); _file->meshes.emplace_back(_file->in->tellg(), 0, positionIndexOffset, textureCoordinateIndexOffset, normalIndexOffset); }