Bug 12081 – Warn against, and then deprecate class allocators

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-02-05T04:11:40Z
Last change time
2020-03-21T03:56:39Z
Keywords
diagnostic
Assigned to
No Owner
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2014-02-05T04:11:40Z
According to the docs class allocators are deprecated: http://dlang.org/class.html#allocators But this code gives no warnings nor deprecation errors, that I suggest to introduce: class Foo { new(size_t sz) { return null; } delete(void* p) {} } void main() {}
Comment #1 by b2.temp — 2019-02-13T02:56:01Z
They've been removed now. Only one limited form remains, with @disable, to allow blocking the 'new' operator.