Files
swift-mirror/test/Interop/Cxx/templates/Inputs/class-template-with-simd-parameter.h
Egor Zhdan d19c9eb32b [cxx-interop] Disambiguate template instantiations with SIMD parameters
When converting a C++ class template instantiation name into Swift, we previously didn't account for possible SIMD types. Those types were printed as `_`. This meant that e.g. `std::vector<simd::float3>` and `std::vector<simd::float4>` would get the same Swift name, causing compiler errors down the road.

rdar://134214091
2024-09-04 16:46:23 +01:00

13 lines
341 B
C++

#include <simd/simd.h>
template <typename T>
struct Templated {
T t;
};
typedef Templated<simd::uint1> TemplatedSIMDUInt1;
typedef Templated<simd::uint16> TemplatedSIMDUInt16;
typedef Templated<simd::float3> TemplatedSIMDFloat3;
typedef Templated<simd::float4> TemplatedSIMDFloat4;
typedef Templated<simd::double8> TemplatedSIMDDouble8;