Hi, I think this actually introduced a subtle bug. When calling swap with two identical instances of a struct with elaborate assign, _d_arraycopy throws an exception due to memory overlap. This can happen with the sort algorithm for example.
MartinOn Thu, 18 Nov 2010 22:26:12 +0100, dsource.org <[email protected]> wrote:
phobos commit, revision 2180 user: rsinfu msg: Made std.algorithm.swap "@trusted pure nothrow". Also some minor fixes: * Made parameter names consistent with ddoc: lhs and rhs.* 'memcpy' only when T has a non-trivial assignment, i.e. when T defines postblit, destructor and/or opAssign.* 3-space indent -> 4-space. http://www.dsource.org/projects/phobos/changeset/2180
swap.patch
Description: Binary data
_______________________________________________ phobos mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/phobos
