https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101883
Bug ID: 101883 Summary: class template argument deduction in non-type template parameter allows explicit deduction guide Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: barry.revzin at gmail dot com Target Milestone: --- Reduced example: template <class T> struct C { constexpr C(int) {} }; explicit C(int) -> C<int>; template <C c> struct X { }; X<1> x; This should fail to compile, because the deduction guide is explicit and so should not be a candidate, but gcc accepts this example. gcc does correctly reject: C y = 1; Which is the same kind of thing.