[Issue 19904] move semantics fail through the `emplace` pipeline

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue May 28 08:09:44 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=19904

Atila Neves <atila.neves at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |atila.neves at gmail.com

--- Comment #6 from Atila Neves <atila.neves at gmail.com> ---
This compiles and works as intended though:

import std.stdio;

void fun(T)(auto ref T x) {
    static if(__traits(isRef, x))
        writeln("x: ", x, " is a ref");
    else
        writeln("x: ", x, " is NOT a ref");
}


void main() {
    fun(42);
    int i;
    fun(i);
}

--


More information about the Digitalmars-d-bugs mailing list