[Issue 21891] Cannot alias every kind that can be passed via variadic templates
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon May 3 22:07:12 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21891
Paul Backus <snarwin+bugzilla at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |snarwin+bugzilla at gmail.com
--- Comment #2 from Paul Backus <snarwin+bugzilla at gmail.com> ---
(In reply to Andrei Alexandrescu from comment #0)
> So in fact 1 is bindable to an alias but somehow not in all contexts!
Specifically: an expression can bind to a template alias parameter, but is not
allowed on the right-hand side of an alias declaration.
The reason `alias Y = X;` works but `alias Y = X[0];` doesn't is that `X` by
itself on the right-hand side is parsed as a symbol, not an expression. The
variadic parameter is a distraction.
--
More information about the Digitalmars-d-bugs
mailing list