https://issues.dlang.org/show_bug.cgi?id=14152
Issue ID: 14152 Summary: Document when function returns are moves vs. copies Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: websites Assignee: nob...@puremagic.com Reporter: peter.alexander...@gmail.com The language specification makes no mention of when a value will be moved or copied when returned from a function. This is important not just for optimization, but for semantics of non-copyable types (e.g. Unique). Particularly, we need to guarantee: 1. Returning an rvalue does not entail a copy. 2. Last return of a function local variable does not entail a copy. See discussion: http://forum.dlang.org/thread/uiqnamficseklfowm...@forum.dlang.org --