Issue 19379 - Make a public alias for the return type of std.typecons.scoped
Summary: Make a public alias for the return type of std.typecons.scoped
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86_64 Linux
: P4 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-08 16:31 UTC by Neia Neutuladh
Modified: 2024-12-01 16:34 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Neia Neutuladh 2018-11-08 16:31:01 UTC
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
Comment 1 dlangBugzillaToGithub 2024-12-01 16:34:28 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/phobos/issues/10358

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB