Bug 13068 – std.typecons.Unique should disable postblit

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2014-07-07T13:46:00Z
Last change time
2014-07-20T16:15:46Z
Keywords
pull
Assigned to
nobody
Creator
nick

Comments

Comment #0 by nick — 2014-07-07T13:46:20Z
Unique!int u1 = new int; auto u2 = u1; // should be disallowed auto u3 = u1.release; // ok Otherwise u2 and u1 both own the same memory, which will be freed twice. I'll make a pull request to fix this.
Comment #1 by nick — 2014-07-07T13:55:49Z
Comment #2 by github-bugzilla — 2014-07-20T16:15:45Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/16db4ef6b4ba3d52abdf9bb7ac63b0f2c8c03c8e Fix Issue 13068 - std.typecons.Unique should disable postblit https://github.com/D-Programming-Language/phobos/commit/852c84317fa0e1ae586e3de0581f8b3b3ae16de7 Merge pull request #2308 from ntrel/unique-tests Fix Issue 13068 - std.typecons.Unique should disable postblit