Browse Source

MSVC 2013 compatibility: can't use typename here.

Meanwhile _every_other_compiler_ *requires* the typename keyword.
Vladimír Vondruš 12 years ago
parent
commit
9fcd535bec
  1. 40
      src/Magnum/SceneGraph/Object.h

40
src/Magnum/SceneGraph/Object.h

@ -279,7 +279,13 @@ template<class Transformation> class Object: public AbstractObject<Transformatio
*/
/* `objects` passed by copy intentionally (to allow move from
transformationMatrices() and avoid copy in the function itself) */
std::vector<typename Transformation::DataType> transformations(std::vector<std::reference_wrapper<Object<Transformation>>> objects, const typename Transformation::DataType& initialTransformation = typename Transformation::DataType()) const;
std::vector<typename Transformation::DataType> transformations(std::vector<std::reference_wrapper<Object<Transformation>>> 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 Transformation> class Object: public AbstractObject<Transformatio
* @deprecated Use @ref Magnum::SceneGraph::Object::transformations(std::vector<std::reference_wrapper<Object<Transformation>>>, const typename Transformation::DataType&) "transformations(std::vector<std::reference_wrapper<Object<Transformation>>>, const typename Transformation::DataType&)" instead.
* @todoc fix this when Doxygen is sane (see related function in AbstractObject)
*/
CORRADE_DEPRECATED("use transformations(std::vector<std::reference_wrapper<Object<Transformation>>>, const typename Transformation::DataType&) instead") std::vector<typename Transformation::DataType> transformations(const std::vector<Object<Transformation>*>& objects, const typename Transformation::DataType& initialTransformation = typename Transformation::DataType()) const;
#ifdef CORRADE_GCC47_COMPATIBILITY
CORRADE_DEPRECATED("use transformations(std::vector<std::reference_wrapper<Object<Transformation>>>, const typename Transformation::DataType&) instead") std::vector<typename Transformation::DataType> transformations(const std::vector<Object<Transformation>*>& 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<typename Transformation::DataType> transformations(std::initializer_list<std::reference_wrapper<Object<Transformation>>> 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<typename Transformation::DataType> transformations(std::initializer_list<std::reference_wrapper<Object<Transformation>>> 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<std::reference_wrapper<Object<Transformation>>>(objects), initialTransformation);
}
CORRADE_DEPRECATED("use transformations(std::vector<std::reference_wrapper<Object<Transformation>>>, const typename Transformation::DataType&) instead") std::vector<typename Transformation::DataType> transformations(std::initializer_list<Object<Transformation>*> objects, const typename Transformation::DataType& initialTransformation = typename Transformation::DataType()) const;
CORRADE_DEPRECATED("use transformations(std::vector<std::reference_wrapper<Object<Transformation>>>, const typename Transformation::DataType&) instead") std::vector<typename Transformation::DataType> transformations(std::initializer_list<Object<Transformation>*> objects, const typename Transformation::DataType& initialTransformation =
#ifndef CORRADE_MSVC2013_COMPATIBILITY
typename Transformation::DataType()
#else
Transformation::DataType()
#endif
) const;
#endif
#endif

Loading…
Cancel
Save