Skip to content
Snippets Groups Projects
user avatar
Carsten Gräser authored
Using the wrapper generated by `asVector()` we can get rid of `toVector()`.
The important difference is, that `toVector()` invokes undefined behaviour
by dereferencing the result of an aliasing `reinterpret_cast`. However,
there's no noteable properties of the new implementation:
* You can't use `asVector()` directly in calls to `mv()` and friends,
  because the latter is not robust wrt. to proxy references.
* When creating copies of values, you can't replace
  `auto rhs = v[i];` by `auto rhs = Impl::asVector(v[i])`
  because proxy references don't use deep copy on purpose.
  Instead we have to use the two step
  `auto rhsValue = v[i]; auto&& rhs = Impl::asVector(rhsValue);`
d883ca6e
History
Name Last commit Last update