diff --git a/src/Magnum/Animation/Interpolation.h b/src/Magnum/Animation/Interpolation.h index e73b19b94..6b39ec079 100644 --- a/src/Magnum/Animation/Interpolation.h +++ b/src/Magnum/Animation/Interpolation.h @@ -339,29 +339,73 @@ template<> struct TypeTraits: TypeTraitsBool {}; template struct TypeTraits, Math::BoolVector>: TypeTraitsBool> {}; /* Complex, preferring slerp() as it is more precise */ -template struct MAGNUM_EXPORT TypeTraits, Math::Complex> { +template struct +#ifndef CORRADE_TARGET_CLANG_CL +/* Clang-CL complains that it's ignored if it's on the class, so putting it + on the function instead. However MSVC doesn't like that, so doing this only + for Clang-CL. */ +MAGNUM_EXPORT +#endif +TypeTraits, Math::Complex> { typedef Math::Complex(*Interpolator)(const Math::Complex&, const Math::Complex&, Float); - static Interpolator interpolator(Interpolation interpolation); + static + #ifdef CORRADE_TARGET_CLANG_CL + MAGNUM_EXPORT + #endif + Interpolator interpolator(Interpolation interpolation); }; /* Quaternions and dual quaternions, preferring slerp() as it is more precise */ -template struct MAGNUM_EXPORT TypeTraits, Math::Quaternion> { +template struct +#ifndef CORRADE_TARGET_CLANG_CL +/* Clang-CL complains that it's ignored if it's on the class, so putting it + on the function instead. However MSVC doesn't like that, so doing this only + for Clang-CL. */ +MAGNUM_EXPORT +#endif +TypeTraits, Math::Quaternion> { typedef Math::Quaternion(*Interpolator)(const Math::Quaternion&, const Math::Quaternion&, Float); - static Interpolator interpolator(Interpolation interpolation); + static + #ifdef CORRADE_TARGET_CLANG_CL + MAGNUM_EXPORT + #endif + Interpolator interpolator(Interpolation interpolation); }; -template struct MAGNUM_EXPORT TypeTraits, Math::DualQuaternion> { +template struct +#ifndef CORRADE_TARGET_CLANG_CL +/* Clang-CL complains that it's ignored if it's on the class, so putting it + on the function instead. However MSVC doesn't like that, so doing this only + for Clang-CL. */ +MAGNUM_EXPORT +#endif +TypeTraits, Math::DualQuaternion> { typedef Math::DualQuaternion(*Interpolator)(const Math::DualQuaternion&, const Math::DualQuaternion&, Float); - static Interpolator interpolator(Interpolation interpolation); + static + #ifdef CORRADE_TARGET_CLANG_CL + MAGNUM_EXPORT + #endif + Interpolator interpolator(Interpolation interpolation); }; /* Cubic Hermite spline point has a different result type */ -template struct MAGNUM_EXPORT TypeTraits, T> { +template struct +#ifndef CORRADE_TARGET_CLANG_CL +/* Clang-CL complains that it's ignored if it's on the class, so putting it + on the function instead. However MSVC doesn't like that, so doing this only + for Clang-CL. */ +MAGNUM_EXPORT +#endif +TypeTraits, T> { typedef T(*Interpolator)(const Math::CubicHermite&, const Math::CubicHermite&, Float); - static Interpolator interpolator(Interpolation interpolation); + static + #ifdef CORRADE_TARGET_CLANG_CL + MAGNUM_EXPORT + #endif + Interpolator interpolator(Interpolation interpolation); }; }