http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59056
Bug ID: 59056 Summary: enable_if turns a non-ambiguous template into an ambiguous one Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: walter.mascarenhas at gmail dot com Created attachment 31187 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31187&action=edit a simple code illustrating the bug The attached file shows that by turning a specialization of template <class A, class Enable = void> struct Foo {}; like this one (which works just fine) template <class A> struct Foo<A, void>{}; into template <class A> struct Foo<A, std::enable_if< typename always_true<A>() >::type >{}; we can get ambigouities, even when typename always_true<A>() >::type always resolves to void. For more details, look at the attachement