From 9fcd535becee33ccfa525177a98c7c091fc44a79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 19 Feb 2014 18:26:20 +0100 Subject: [PATCH] MSVC 2013 compatibility: can't use typename here. Meanwhile _every_other_compiler_ *requires* the typename keyword. --- src/Magnum/SceneGraph/Object.h | 40 ++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/src/Magnum/SceneGraph/Object.h b/src/Magnum/SceneGraph/Object.h index 28fe75b83..09cdfcb0e 100644 --- a/src/Magnum/SceneGraph/Object.h +++ b/src/Magnum/SceneGraph/Object.h @@ -279,7 +279,13 @@ template class Object: public AbstractObject transformations(std::vector>> objects, const typename Transformation::DataType& initialTransformation = typename Transformation::DataType()) const; + std::vector transformations(std::vector>> objects, const typename Transformation::DataType& initialTransformation = + #ifndef CORRADE_MSVC2013_COMPATIBILITY + typename Transformation::DataType() + #else + Transformation::DataType() + #endif + ) const; #ifdef MAGNUM_BUILD_DEPRECATED /** @@ -287,16 +293,36 @@ template class Object: public AbstractObject>>, const typename Transformation::DataType&) "transformations(std::vector>>, const typename Transformation::DataType&)" instead. * @todoc fix this when Doxygen is sane (see related function in AbstractObject) */ - CORRADE_DEPRECATED("use transformations(std::vector>>, const typename Transformation::DataType&) instead") std::vector transformations(const std::vector*>& objects, const typename Transformation::DataType& initialTransformation = typename Transformation::DataType()) const; - - #ifdef CORRADE_GCC47_COMPATIBILITY + CORRADE_DEPRECATED("use transformations(std::vector>>, const typename Transformation::DataType&) instead") std::vector transformations(const std::vector*>& objects, const typename Transformation::DataType& initialTransformation = + #ifndef CORRADE_MSVC2013_COMPATIBILITY + typename Transformation::DataType() + #else + Transformation::DataType() + #endif + ) const; + + #if defined(CORRADE_GCC47_COMPATIBILITY) || defined(CORRADE_MSVC2013_COMPATIBILITY) /* Workarounds to avoid ambiguous overload errors on GCC < 4.8. And I - thought 4.7 was bug-free. */ - std::vector transformations(std::initializer_list>> objects, const typename Transformation::DataType& initialTransformation = typename Transformation::DataType()) const { + thought 4.7 was bug-free. This issue is somehow also in MSVC 2013, + but only here and not with setClean() and others. */ + std::vector transformations(std::initializer_list>> objects, const typename Transformation::DataType& initialTransformation = + #ifndef CORRADE_MSVC2013_COMPATIBILITY + typename Transformation::DataType() + #else + Transformation::DataType() + #endif + ) const + { /* GCC 4.5 doesn't like {} here */ return transformations(std::vector>>(objects), initialTransformation); } - CORRADE_DEPRECATED("use transformations(std::vector>>, const typename Transformation::DataType&) instead") std::vector transformations(std::initializer_list*> objects, const typename Transformation::DataType& initialTransformation = typename Transformation::DataType()) const; + CORRADE_DEPRECATED("use transformations(std::vector>>, const typename Transformation::DataType&) instead") std::vector transformations(std::initializer_list*> objects, const typename Transformation::DataType& initialTransformation = + #ifndef CORRADE_MSVC2013_COMPATIBILITY + typename Transformation::DataType() + #else + Transformation::DataType() + #endif + ) const; #endif #endif