Bug 14278 – cpptod still refers to deprecated typedef keyword

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-03-12T00:04:08Z
Last change time
2020-05-18T12:37:09Z
Assigned to
No Owner
Creator
Laeeth

Comments

Comment #0 by laeeth — 2015-03-12T00:04:08Z
http://dlang.org/cpptod.html The D Way No need for idiomatic constructions like the above. Just write: typedef void* Handle = cast(void*)-1; void bar(Handle); Handle h; bar(h); h = func(); if (h != Handle.init) ... Note how a default initializer can be supplied for the typedef as a value of the underlying type.
Comment #1 by pro.mathias.lang — 2020-05-18T12:37:09Z
You must have had an old copy because that sentence was removed in 2013: https://github.com/dlang/dlang.org/pull/276/files#diff-8e38c567543da103fbf9d9e01d9d370dL1064