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