Let's say I have the following struct types:

```
struct XStruct {
   int a_value;
   int b_value;
}

struct YStruct {
   int c_value;
   int d_value;
};

```

Now I have the following vector:

```
std::vector<XStruct> m_x_values;

```

And I want to project my data to so that `c_value`s = `b_value`s and `d_value`s = `a_value`s

```
std::vector<YStruct> m_y_values;

```

What's the most efficient way to do this:

Option 1:

```
m_y_values.clear();
m_y_values.reserve(m_x_values.size());

for(auto x : m_x_values)
{
    m_y_values.push_back({x.b_value, x.a_value});
}

```

Option 2:

```
m_y_values.resize(m_x_values.size());
int i = 0;
for(auto x : m_x_values)
{
    m_y_values[i].c_value = x.b_value
    m_y_values[i].d_value = x.a_value;
    ++i;
}

```

Any other suggestion?