On Friday, 8 May 2020 at 22:03:47 UTC, NaN wrote:
Ok given the following code...

auto foo(T)(T x)
{
    struct V1 { T* what; }
    V1 v;
    return v;
}

auto bam(T)(T x)
{
    struct V2 { T* what; }
    V2 v;
    return v;
}

void bar()
{
    bam(foo(1));
}

Should have said that compiles fine when x is passed by value.

Reply via email to