29 #ifndef VC_COMMON_SIMD_CAST_H_
30 #define VC_COMMON_SIMD_CAST_H_
32 #include <type_traits>
35 namespace Vc_VERSIONED_NAMESPACE
47 template <
typename To,
typename From>
48 Vc_INTRINSIC Vc_CONST enable_if<std::is_same<To, Traits::decay<From>>::value, To>
51 return std::forward<From>(x);
61 template <
typename To> Vc_INTRINSIC Vc_CONST To
simd_cast() {
return To(); }
65 #endif // VC_COMMON_SIMD_CAST_H_
enable_if< std::is_same< To, Traits::decay< From > >::value, To > simd_cast(From &&x)
Casts the argument x from type From to type To.