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

           Summary: isExpression and templates should capture all template
                    parameters when using variadic TemplateParameter
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: simen.kja...@gmail.com


--- Comment #0 from Simen Kjaeraas <simen.kja...@gmail.com> 2012-07-23 07:12:49 
PDT ---
template TemplateInfo( T ) {
    static if ( is( T t == U!V, alias U, V... ) ) {
        alias U Template;
        alias V Arguments;
    }
}

The above template easily matches Tuple!(whatever), since Tuple is a template
with only one parameter, which is variadic. It does not, however, match
Rebindable!MyClass, since that template does not follow the pattern.

The idea behind bug 3608 was to cover exactly this, but it has been
insufficiently communicated in that report, hence this new report.

tl;dr: inside an IsExpression, T... should match a whole TemplateParameterList,
not just a TemplateTupleParameter.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to