B
bartek
Hello,
It is not possible to assign values to, say, a vector<float[3]> due to the
fact that arrays are not assignable.
Theoretically there's a simple workaround which involves wrapping the array
in a struct, e.g.
struct float3
{
float m[3];
};
....and then using vector<float3>
The problem with this approach is, that there's no guarantee that
sizeof(float[3]) == sizeof(float3).
My question boils down to: is there any non-contrived generic way to treat
containers of array types in an analogous way to non-array types?
Cheers,
b
It is not possible to assign values to, say, a vector<float[3]> due to the
fact that arrays are not assignable.
Theoretically there's a simple workaround which involves wrapping the array
in a struct, e.g.
struct float3
{
float m[3];
};
....and then using vector<float3>
The problem with this approach is, that there's no guarantee that
sizeof(float[3]) == sizeof(float3).
My question boils down to: is there any non-contrived generic way to treat
containers of array types in an analogous way to non-array types?
Cheers,
b