// 外部APIなどの構造体
struct dim3 {
unsigned int x;
unsigned int y;
unsigned int z;
};
struct Dim3 {
unsigned int x;
unsigned int y;
unsigned int z;
// to<dim3>
operator dim3() const {
return {
.x = x,
.y = y,
.z = z,
};
}
// From<dim3>
explicit Dim3(dim3 dim) : x(dim.x), y(dim.y), z(dim.z) {}
};
Discussion