enum A{a,b,c}; template<typename T, int i, A x, typename U> void f(const U&, int) {} template<typename T, int i, typename U> void f(const U&, int) {} template<typename U> void f(const U&, int) {} template<typename T, A x, typename U> void f(const U&, int, int) {} template<typename T, typename U> void f(const U&, int, int) {} template<typename U> void f(const U&, int, int) {}
int main() { bool b; f<int, 1, a>(b, 5); f<int, 1>(b, 5); f<>(b, 5); f<int, a>(b, 5, 10); f<int>(b, 5, 10); f<>(b, 5, 10); } gets you: ~/ootbc/members/src$ g++ foo.cc foo.cc: In function `int main()': foo.cc:11: error: invalid conversion from `int' to `A' foo.cc:12: error: invalid conversion from `int' to `A' Ivan -- Summary: spurious error Product: gcc Version: 3.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: igodard at pacbell dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24717