Bug 16172 – std.experimental.allocator.make mistakenly thinks default construction possible on classes with a private constructor

Status
NEW
Severity
normal
Priority
P3
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2016-06-14T13:04:00Z
Last change time
2024-12-01T16:27:12Z
Assigned to
No Owner
Creator
joeyemmons
Moved to GitHub: phobos#9686 →

Comments

Comment #0 by joeyemmons — 2016-06-14T13:04:00Z
Allocator make with no extra args works on classes even when default construction is not available. import other; import std.experimental.allocator; import std.experimental.allocator.mallocator; void main(){ // auto t1 = new test(); // Error auto t = Mallocator.instance.make!test(); // Mistakenly Works } ... module other; class test{ private this(int i){ // No default constructor... } } Related Issues: Issue 16171
Comment #1 by robert.schadek — 2024-12-01T16:27:12Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/9686 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB