Summary: Can't use empty tuple as default value for variadic
                    template function parameter
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: DMD

--- Comment #0 from Vladimir Panteleev <> 2011-09-06 
12:40:19 PDT ---
template Tuple(T...) { alias T Tuple; }

void f(T...)(int arg0 = 0, T argN = Tuple!());

static this() { f(); }

Compiler output:
test.d(3): Error: cannot implicitly convert expression (tuple()) of type () to
test.d(5): Error: template instance test.f!() error instantiating

The compiler requires a default value for argN, because it comes after another
optional argument, but it doesn't seem like an empty tuple can be specified.

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

Reply via email to