[Issue 19379] New: Make a public alias for the return type of std.typecons.scoped
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Nov 8 16:31:01 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19379
Issue ID: 19379
Summary: Make a public alias for the return type of
std.typecons.scoped
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: dhasenan at gmail.com
The documentation for std.typecons.scoped says to use typeof() to identify the
type.
I know the arguments for keeping the actual type opaque. We've been over it
with std.regex.Captures and so forth. It would be really great to have a way to
name that type succinctly so you can use it in fields, pass it as a parameter
(by reference obviously), instantiate templates of it, explicitly name variable
types, that kind of thing, without having to use aliases everywhere.
Example of someone getting confused by how to use it without that sort of type
naming: https://forum.dlang.org/thread/tnwyxmraefedcbypugqp@forum.dlang.org
--
More information about the Digitalmars-d-bugs
mailing list