http://d.puremagic.com/issues/show_bug.cgi?id=6613

           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
        AssignedTo: nob...@puremagic.com
        ReportedBy: thecybersha...@gmail.com


--- Comment #0 from Vladimir Panteleev <thecybersha...@gmail.com> 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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to