Summary: template argument ignored with specialization for
                    dependent parameter
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2012-03-11 09:58:11 PDT ---
cat > bug.d << CODE
struct Pair(T1, T2) {}

template foo(T : Pair!(T, U), U)
    pragma(msg, "foo ", T, U);

template bar(T : Pair!(T, U), U:int)
    pragma(msg, "bar ", T, U);

static assert(!__traits(compiles, foo!(Pair!(double, short), int))); // OK
static assert(!__traits(compiles, bar!(Pair!(double, short), int))); // fails

dmd -c bug


For bar the argument to U is ignored and U is deduced from Pair.

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

Reply via email to