Summary: Value parameter types not respected in templates
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Andrei Alexandrescu <> 2011-12-10 
11:05:03 PST ---
This code fails to compile:

struct A(size_t N) {}
void main() {
    A!(1) a1;
    A!(cast(size_t) 1) a2;
    assert(a1 == a2);

with the message:

./test.d(10): Error: incompatible types for ((a1) == (a2)): 'A!(1)' and

This is mistaken. The type of N is not decided by the instantiation, but by A.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to