Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a public alias for the return type of std.typecons.scoped #10358

Open
dlangBugzillaToGithub opened this issue Nov 8, 2018 · 0 comments
Open

Comments

@dlangBugzillaToGithub
Copy link

dhasenan (@dhasenan) reported this on 2018-11-08T16:31:01Z

Transfered from https://issues.dlang.org/show_bug.cgi?id=19379

Description

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
@thewilsonator thewilsonator removed OS:Linux Issues specific to Linux Arch:x86_64 Issues specific to x86_64 P4 labels Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants