No, that is not true. auto var = expr;
is more like passing expr
by value.
int x[1];
auto y = x;
This makes y
a int*
.
Mostly auto x = expr;
behaves like template type deduction:
template <typename T>
void f(T);
int x[1];
f(x); // deduces T as int*
It is more like std::decay<decltype(expr)> var = expr;
.