On Tuesday, 23 July 2019 at 00:54:08 UTC, aliak wrote:
On Tuesday, 23 July 2019 at 00:36:49 UTC, Exil wrote:
auto ref get(T)(W!T value) {
return value.front;
}
You're returning a reference to a temporary that gets deleted
at the end of the function's scope. The "auto ref" here will
be a
On Tuesday, 23 July 2019 at 00:36:49 UTC, Exil wrote:
auto ref get(T)(W!T value) {
return value.front;
}
You're returning a reference to a temporary that gets deleted
at the end of the function's scope. The "auto ref" here will be
a "ref".
. oh ... shit you're right.
Ok so this
auto ref get(T)(W!T value) {
return value.front;
}
You're returning a reference to a temporary that gets deleted at
the end of the function's scope. The "auto ref" here will be a
"ref".