[Issue 11219] isExpression should work on non-type template instantiations
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Nov 14 00:30:12 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11219
yebblies <yebblies at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |yebblies at gmail.com
Resolution| |INVALID
--- Comment #1 from yebblies <yebblies at gmail.com> 2013-11-14 19:30:07 EST ---
This cannot work - in this code:
template Rectangle(float w, float h) {
enum values = TypeTuple!(w,h);
}
Rectangle!(1.0f, 1.0f) _is_ TypeTuple!(1.0f, 1.0f) - the wrapping template is
gone once semantic is evaluated.
You're asking for something impossible - determining if a literal _could_ be
produced by a template.
eg
template x(int a) { enum x = a; }
static assert(is(x!3 == x!N, N));
Compiler sees it as
static assert(is(3 == x!N, N));
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list