Skip to content
Snippets Groups Projects
Commit d883ca6e authored by Carsten Gräser's avatar Carsten Gräser Committed by Oliver Sander
Browse files

Get rid of toVector()

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);`
parent 36190383
Branches
Tags
Loading
Checking pipeline status
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment