So I am trying to do the following:
typedef struct {
float x, y;
} k_vec2;
typedef k_vec2 k_Triangle[3];
k_Triangle t;
t[0] = {1, 1};
t[1] = {2, 1};
t[2] = {3, 1};
std::vector<k_Triangle> ts;
ts.push_back(t);
And I'm getting the following errors that I don't quite understand:
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\xmemory(730): error C2672: 'std::construct_at': no matching overloaded function found
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\xutility(461): note: could be '_Ty *std::construct_at(_Ty *const ,_Types ...) noexcept(<expr>)'
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\xmemory(730): note: the associated constraints are not satisfied
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\xutility(459): note: '<unnamed-symbol>': initialization requires a brace-enclosed initializer list
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\xutility(459): note: 'anonymous struct or union': initialization requires a brace-enclosed initializer list
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\xutility(459): note: 'initializing': cannot convert from 'const k_vec2 [3]' to 'float'
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\xutility(459): note: There is no context in which this conversion is possible
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\xmemory(730): note: the template instantiation context (the oldest one first) is
Any help would be very much appreciated.






