Bug 16171 – std.experimental.allocator.make does not respect private class constructors

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

Comments

Comment #0 by joeyemmons — 2016-06-14T10:53:32Z
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(); // Works } ... module other; class test{ private this(){ } } Worse even is it will still work even if class test does not have a default constructor at all. module other; class test{ private this(int i){ // No default constructor... } }
Comment #1 by b2.temp — 2016-06-14T12:23:18Z
(In reply to joeyemmons from comment #0) > > Worse even is it will still work even if class test does not have a default > constructor at all. > > module other; > class test{ > private this(int i){ > // No default constructor... > } > } please make another report for this one. This is another issue.
Comment #2 by joeyemmons — 2016-06-14T13:04:46Z
(In reply to b2.temp from comment #1) > please make another report for this one. This is another issue. Issue 16172
Comment #3 by robert.schadek — 2024-12-01T16:27:09Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10183 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB