Browse Source

MSVC 2015 compatibility: broken multiple definitions of template aliases.

Causes the compiler to forget random type declarations. How is that even
possible.
pull/107/head
Vladimír Vondruš 11 years ago
parent
commit
d2d0943ffa
  1. 4
      src/Magnum/Color.h
  2. 2
      src/Magnum/ImageReference.h
  3. 6
      src/Magnum/Math/Matrix.h
  4. 2
      src/Magnum/Math/Range.h
  5. 12
      src/Magnum/Math/RectangularMatrix.h
  6. 6
      src/Magnum/SceneGraph/AbstractCamera.h
  7. 4
      src/Magnum/SceneGraph/AbstractFeature.h
  8. 8
      src/Magnum/SceneGraph/AbstractGroupedFeature.h
  9. 4
      src/Magnum/SceneGraph/AbstractObject.h
  10. 4
      src/Magnum/SceneGraph/AbstractTransformation.h
  11. 4
      src/Magnum/SceneGraph/AbstractTranslation.h
  12. 4
      src/Magnum/SceneGraph/Animable.h
  13. 4
      src/Magnum/SceneGraph/AnimableGroup.h
  14. 4
      src/Magnum/SceneGraph/Camera.h
  15. 10
      src/Magnum/SceneGraph/Drawable.h
  16. 8
      src/Magnum/SceneGraph/FeatureGroup.h
  17. 4
      src/Magnum/SceneGraph/TranslationTransformation.h

4
src/Magnum/Color.h

@ -43,12 +43,16 @@ namespace Magnum {
/** @copybrief Math::Color3
* @deprecated Use @ref Math::Color3 instead.
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using BasicColor3 CORRADE_DEPRECATED_ALIAS("use Math::Color3 instead") = Math::Color3<T>;
#endif
/** @copybrief Math::Color4
* @deprecated Use @ref Math::Color4 instead.
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using BasicColor4 CORRADE_DEPRECATED_ALIAS("use Math::Color4 instead") = Math::Color4<T>;
#endif
}
#else

2
src/Magnum/ImageReference.h

@ -40,7 +40,9 @@ namespace Magnum {
/** @copybrief ImageView
* @deprecated Use @ref ImageView instead.
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<UnsignedInt dimensions> using CORRADE_DEPRECATED_ALIAS("use ImageView instead") ImageReference = ImageView<dimensions>;
#endif
/** @copybrief ImageView1D
* @deprecated Use @ref ImageView1D instead.

6
src/Magnum/Math/Matrix.h

@ -228,7 +228,9 @@ Convenience alternative to `Matrix<2, T>`. See @ref Matrix for more
information.
@see @ref Magnum::Matrix2x2, @ref Magnum::Matrix2x2d
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using Matrix2x2 = Matrix<2, T>;
#endif
/**
@brief 3x3 matrix
@ -238,7 +240,9 @@ information. Note that this is different from @ref Matrix3, which contains
additional functions for transformations in 2D.
@see @ref Magnum::Matrix3x3, @ref Magnum::Matrix3x3d
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using Matrix3x3 = Matrix<3, T>;
#endif
/**
@brief 4x4 matrix
@ -248,7 +252,9 @@ information. Note that this is different from @ref Matrix4, which contains
additional functions for transformations in 3D.
@see @ref Magnum::Matrix4x4, @ref Magnum::Matrix4x4d
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using Matrix4x4 = Matrix<4, T>;
#endif
MAGNUM_MATRIX_OPERATOR_IMPLEMENTATION(Matrix<size, T>)

2
src/Magnum/Math/Range.h

@ -211,7 +211,9 @@ template<UnsignedInt dimensions, class T> class Range {
Convenience alternative to `Range<1, T>`. See @ref Range for more
information.
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using Range1D = Range<1, T>;
#endif
/**
@brief Two-dimensional range

12
src/Magnum/Math/RectangularMatrix.h

@ -399,7 +399,9 @@ Convenience alternative to `RectangularMatrix<2, 3, T>`. See
@ref RectangularMatrix for more information.
@see @ref Magnum::Matrix2x3, @ref Magnum::Matrix2x3d
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using Matrix2x3 = RectangularMatrix<2, 3, T>;
#endif
/**
@brief Matrix with 3 columns and 2 rows
@ -408,7 +410,9 @@ Convenience alternative to `RectangularMatrix<3, 2, T>`. See
@ref RectangularMatrix for more information.
@see @ref Magnum::Matrix3x2, @ref Magnum::Matrix3x2d
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using Matrix3x2 = RectangularMatrix<3, 2, T>;
#endif
/**
@brief Matrix with 2 columns and 4 rows
@ -417,7 +421,9 @@ Convenience alternative to `RectangularMatrix<2, 4, T>`. See
@ref RectangularMatrix for more information.
@see @ref Magnum::Matrix2x4, @ref Magnum::Matrix2x4d
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using Matrix2x4 = RectangularMatrix<2, 4, T>;
#endif
/**
@brief Matrix with 4 columns and 2 rows
@ -426,7 +432,9 @@ Convenience alternative to `RectangularMatrix<4, 2, T>`. See
@ref RectangularMatrix for more information.
@see @ref Magnum::Matrix4x2, @ref Magnum::Matrix4x2d
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using Matrix4x2 = RectangularMatrix<4, 2, T>;
#endif
/**
@brief Matrix with 3 columns and 4 rows
@ -435,7 +443,9 @@ Convenience alternative to `RectangularMatrix<3, 4, T>`. See
@ref RectangularMatrix for more information.
@see @ref Magnum::Matrix3x4, @ref Magnum::Matrix3x4d
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using Matrix3x4 = RectangularMatrix<3, 4, T>;
#endif
/**
@brief Matrix with 4 columns and 3 rows
@ -444,7 +454,9 @@ Convenience alternative to `RectangularMatrix<4, 3, T>`. See
@ref RectangularMatrix for more information.
@see @ref Magnum::Matrix4x3, @ref Magnum::Matrix4x3d
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using Matrix4x3 = RectangularMatrix<4, 3, T>;
#endif
/** @relates RectangularMatrix
@brief Multiply number with matrix

6
src/Magnum/SceneGraph/AbstractCamera.h

@ -41,13 +41,17 @@ namespace Magnum { namespace SceneGraph {
* @copybrief Camera
* @deprecated Use @ref Camera instead.
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<UnsignedInt dimensions, class T> using AbstractCamera CORRADE_DEPRECATED_ALIAS("use Camera instead") = Camera<dimensions, T>;
#endif
/**
* @copybrief BasicCamera2D
* @deprecated Use @ref BasicCamera2D instead.
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using AbstractBasicCamera2D CORRADE_DEPRECATED_ALIAS("use BasicCamera2D instead") = BasicCamera2D<T>;
#endif
/**
* @copybrief Camera2D
@ -59,7 +63,9 @@ CORRADE_DEPRECATED("use Camera2D instead") typedef Camera2D AbstractCamera2D;
* @copybrief BasicCamera3D
* @deprecated Use @ref BasicCamera3D instead.
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using AbstractBasicCamera3D CORRADE_DEPRECATED_ALIAS("use BasicCamera3D instead") = BasicCamera3D<T>;
#endif
/**
* @copybrief Camera3D

4
src/Magnum/SceneGraph/AbstractFeature.h

@ -287,7 +287,9 @@ Convenience alternative to `AbstractFeature<2, T>`. See
@ref AbstractFeature for more information.
@see @ref AbstractFeature2D, @ref AbstractBasicFeature3D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using AbstractBasicFeature2D = AbstractFeature<2, T>;
#endif
/**
@brief Base feature for two-dimensional float scenes
@ -303,7 +305,9 @@ Convenience alternative to `AbstractFeature<3, T>`. See
@ref AbstractFeature for more information.
@see @ref AbstractFeature3D, @ref AbstractBasicFeature2D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using AbstractBasicFeature3D = AbstractFeature<3, T>;
#endif
/**
@brief Base feature for three-dimensional float scenes

8
src/Magnum/SceneGraph/AbstractGroupedFeature.h

@ -114,7 +114,9 @@ Convenience alternative to `AbstractGroupedFeature<2, Derived, T>`. See
@ref AbstractGroupedFeature for more information.
@see @ref AbstractGroupedFeature2D, @ref AbstractBasicGroupedFeature3D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class Derived, class T> using AbstractBasicGroupedFeature2D = AbstractGroupedFeature<2, Derived, T>;
#endif
/**
@brief Base grouped feature for two-dimensional float scenes
@ -123,7 +125,9 @@ Convenience alternative to `AbstractBasicGroupedFeature2D<Derived, Float>`.
See @ref AbstractGroupedFeature for more information.
@see @ref AbstractGroupedFeature3D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class Derived> using AbstractGroupedFeature2D = AbstractBasicGroupedFeature2D<Derived, Float>;
#endif
/**
@brief Base grouped feature for three-dimensional scenes
@ -132,7 +136,9 @@ Convenience alternative to `AbstractGroupedFeature<3, Derived, T>`. See
@ref AbstractGroupedFeature for more information.
@see @ref AbstractGroupedFeature3D, @ref AbstractBasicGroupedFeature2D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class Derived, class T> using AbstractBasicGroupedFeature3D = AbstractGroupedFeature<3, Derived, T>;
#endif
/**
@brief Base grouped feature for three-dimensional float scenes
@ -141,7 +147,9 @@ Convenience alternative to `AbstractBasicGroupedFeature3D<Derived, Float>`.
See @ref AbstractGroupedFeature for more information.
@see @ref AbstractGroupedFeature2D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class Derived> using AbstractGroupedFeature3D = AbstractBasicGroupedFeature3D<Derived, Float>;
#endif
}}

4
src/Magnum/SceneGraph/AbstractObject.h

@ -286,7 +286,9 @@ Convenience alternative to `AbstractObject<2, T>`. See
@ref AbstractObject for more information.
@see @ref AbstractObject2D, @ref AbstractBasicObject3D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using AbstractBasicObject2D = AbstractObject<2, T>;
#endif
/**
@brief Base object for two-dimensional float scenes
@ -302,7 +304,9 @@ Convenience alternative to `AbstractObject<3, T>`. See
@ref AbstractObject for more information.
@see @ref AbstractObject3D, @ref AbstractBasicObject2D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using AbstractBasicObject3D = AbstractObject<3, T>;
#endif
/**
@brief Base object for three-dimensional float scenes

4
src/Magnum/SceneGraph/AbstractTransformation.h

@ -111,7 +111,9 @@ Convenience alternative to `AbstractTransformation<2, T>`. See
@ref AbstractTransformation for more information.
@see @ref AbstractTransformation2D, @ref AbstractBasicTransformation3D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using AbstractBasicTransformation2D = AbstractTransformation<2, T>;
#endif
/**
@brief Base transformation for two-dimensional float scenes
@ -127,7 +129,9 @@ Convenience alternative to `AbstractTransformation<3, T>`. See
@ref AbstractTransformation for more information.
@see @ref AbstractTransformation3D, @ref AbstractBasicTransformation2D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using AbstractBasicTransformation3D = AbstractTransformation<3, T>;
#endif
/**
@brief Base transformation for three-dimensional float scenes

4
src/Magnum/SceneGraph/AbstractTranslation.h

@ -121,12 +121,14 @@ Convenience alternative to `AbstractTranslation<2, T, TranslationType>`.
See @ref AbstractTranslation for more information.
@see @ref AbstractTranslation2D, @ref AbstractBasicTranslation3D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
#ifdef DOXYGEN_GENERATING_OUTPUT
template<class T, class TranslationType = T>
#else
template<class T, class TranslationType>
#endif
using AbstractBasicTranslation2D = AbstractTranslation<2, T, TranslationType>;
#endif
/**
@brief Base transformation for two-dimensional float scenes supporting translation
@ -142,12 +144,14 @@ Convenience alternative to `AbstractTranslation<3, T, TranslationType>`.
See @ref AbstractTranslation for more information.
@see @ref AbstractTranslation3D, @ref AbstractBasicTranslation2D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
#ifdef DOXYGEN_GENERATING_OUTPUT
template<class T, class TranslationType = T>
#else
template<class T, class TranslationType>
#endif
using AbstractBasicTranslation3D = AbstractTranslation<3, T, TranslationType>;
#endif
/**
@brief Base transformation for three-dimensional float scenes supporting translation

4
src/Magnum/SceneGraph/Animable.h

@ -330,7 +330,9 @@ Convenience alternative to `Animable<2, T>`. See @ref Animable for more
information.
@see @ref Animable2D, @ref BasicAnimable3D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using BasicAnimable2D = Animable<2, T>;
#endif
/**
@brief Animable for two-dimensional float scenes
@ -346,7 +348,9 @@ Convenience alternative to `Animable<3, T>`. See @ref Animable for more
information.
@see @ref Animable3D, @ref BasicAnimable2D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using BasicAnimable3D = Animable<3, T>;
#endif
/**
@brief Animable for three-dimensional float scenes

4
src/Magnum/SceneGraph/AnimableGroup.h

@ -79,7 +79,9 @@ Convenience alternative to `AnimableGroup<2, T>`. See Animable for
more information.
@see @ref AnimableGroup2D, @ref BasicAnimableGroup3D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using BasicAnimableGroup2D = AnimableGroup<2, T>;
#endif
/**
@brief Animable group for two-dimensional float scenes
@ -95,7 +97,9 @@ Convenience alternative to `AnimableGroup<3, T>`. See Animable for
more information.
@see @ref AnimableGroup3D, @ref BasicAnimableGroup2D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using BasicAnimableGroup3D = AnimableGroup<3, T>;
#endif
/**
@brief Animable group for three-dimensional float scenes

4
src/Magnum/SceneGraph/Camera.h

@ -263,7 +263,9 @@ Convenience alternative to `Camera<2, T>`. See @ref Camera for more
information.
@see @ref Camera2D, @ref BasicCamera3D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using BasicCamera2D = Camera<2, T>;
#endif
/**
@brief Camera for two-dimensional float scenes
@ -279,7 +281,9 @@ Convenience alternative to `Camera<3, T>`. See @ref Camera for more
information.
@see @ref Camera3D, @ref BasicCamera2D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using BasicCamera3D = Camera<3, T>;
#endif
/**
@brief Camera for three-dimensional float scenes

10
src/Magnum/SceneGraph/Drawable.h

@ -212,7 +212,9 @@ Convenience alternative to `Drawable<2, T>`. See @ref Drawable for more
information.
@see @ref Drawable2D, @ref BasicDrawable3D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using BasicDrawable2D = Drawable<2, T>;
#endif
/**
@brief Drawable for two-dimensional float scenes
@ -228,7 +230,9 @@ Convenience alternative to `Drawable<3, T>`. See @ref Drawable for more
information.
@see @ref Drawable3D, @ref BasicDrawable3D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using BasicDrawable3D = Drawable<3, T>;
#endif
/**
@brief Drawable for three-dimensional float scenes
@ -244,7 +248,9 @@ See @ref Drawable for more information.
@see @ref scenegraph, @ref BasicDrawableGroup2D, @ref BasicDrawableGroup3D,
@ref DrawableGroup2D, @ref DrawableGroup3D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<UnsignedInt dimensions, class T> using DrawableGroup = FeatureGroup<dimensions, Drawable<dimensions, T>, T>;
#endif
/**
@brief Group of drawables for two-dimensional scenes
@ -253,7 +259,9 @@ Convenience alternative to `DrawableGroup<2, T>`. See @ref Drawable for
more information.
@see @ref DrawableGroup2D, @ref BasicDrawableGroup3D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using BasicDrawableGroup2D = DrawableGroup<2, T>;
#endif
/**
@brief Group of drawables for two-dimensional float scenes
@ -269,7 +277,9 @@ Convenience alternative to `DrawableGroup<3, T>`. See @ref Drawable for
more information.
@see @ref DrawableGroup3D, @ref BasicDrawableGroup2D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class T> using BasicDrawableGroup3D = DrawableGroup<3, T>;
#endif
/**
@brief Group of drawables for three-dimensional float scenes

8
src/Magnum/SceneGraph/FeatureGroup.h

@ -120,7 +120,9 @@ Convenience alternative to `FeatureGroup<2, Feature, T>`. See
@ref AbstractGroupedFeature for more information.
@see @ref FeatureGroup2D, @ref BasicFeatureGroup3D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class Feature, class T> using BasicFeatureGroup2D = FeatureGroup<2, Feature, T>;
#endif
/**
@brief Base feature group for two-dimensional float scenes
@ -129,7 +131,9 @@ Convenience alternative to `BasicFeatureGroup2D<Feature, Float>`. See
@ref AbstractGroupedFeature for more information.
@see @ref FeatureGroup3D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class Feature> using FeatureGroup2D = BasicFeatureGroup2D<Feature, Float>;
#endif
/**
@brief Base feature group for three-dimensional scenes
@ -138,7 +142,9 @@ Convenience alternative to `FeatureGroup<3, Feature, T>`. See
@ref AbstractGroupedFeature for more information.
@see @ref FeatureGroup3D, @ref BasicFeatureGroup2D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class Feature, class T> using BasicFeatureGroup3D = FeatureGroup<3, Feature, T>;
#endif
/**
@brief Base feature group for three-dimensional float scenes
@ -147,7 +153,9 @@ Convenience alternative to `BasicFeatureGroup3D<Feature, Float>`. See
@ref AbstractGroupedFeature for more information.
@see @ref FeatureGroup2D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
template<class Feature> using FeatureGroup3D = BasicFeatureGroup3D<Feature, Float>;
#endif
template<UnsignedInt dimensions, class Feature, class T> FeatureGroup<dimensions, Feature, T>::~FeatureGroup() {
for(auto i: AbstractFeatureGroup<dimensions, T>::features) static_cast<Feature&>(i.get())._group = nullptr;

4
src/Magnum/SceneGraph/TranslationTransformation.h

@ -152,12 +152,14 @@ Convenience alternative to `TranslationTransformation<2, T, TranslationType>`.
See @ref TranslationTransformation for more information.
@see @ref TranslationTransformation2D, @ref BasicTranslationTransformation3D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
#ifdef DOXYGEN_GENERATING_OUTPUT
template<class T, class TranslationType = T>
#else
template<class T, class TranslationType>
#endif
using BasicTranslationTransformation2D = TranslationTransformation<2, T, TranslationType>;
#endif
/**
@brief Base transformation for two-dimensional float scenes supporting translation
@ -173,12 +175,14 @@ Convenience alternative to `TranslationTransformation<3, T, TranslationType>`.
See @ref TranslationTransformation for more information.
@see @ref TranslationTransformation3D, @ref BasicTranslationTransformation2D
*/
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Multiple definitions still broken */
#ifdef DOXYGEN_GENERATING_OUTPUT
template<class T, class TranslationType = T>
#else
template<class T, class TranslationType>
#endif
using BasicTranslationTransformation3D = TranslationTransformation<3, T, TranslationType>;
#endif
/**
@brief Base transformation for three-dimensional float scenes supporting translation

Loading…
Cancel
Save