http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46105
Summary: Ordering failure among partial specializations with non-deduced context Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: pot...@mac.com See attachment. The second arguments of the two partial specializations evaluate to "void." If void is substituted manually, the code works fine. (But the desired SFINAE side effect is removed.) As neither such argument contains a parameter in a deduced context, they should not participate in deduction. Once the partial specialization has been determined to match, the parameters should be substituted and evaluated to simply void.