https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86689
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Some combination of SFINAE, |[9/10/11/12 Regression]
|overloading, and type |Some combination of SFINAE,
|deduction showing version |overloading, and type
|inconsistency |deduction showing version
| |inconsistency
Target Milestone|--- |9.5
Ever confirmed|0 |1
Known to fail| |10.3.0, 11.2.0, 12.0,
| |8.5.0, 9.4.0
Status|UNCONFIRMED |NEW
CC| |jason at gcc dot gnu.org,
| |ppalka at gcc dot gnu.org
Known to work| |7.5.0
Last reconfirmed| |2021-09-27
--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Confirmed, started with r8-7014. Slightly more reduced rejects-valid testcase:
template <typename T> struct SomeClassTemplate {};
struct TrueType { static constexpr bool value = true; };
template <bool B, typename T=void> struct EnableIfT {};
template <typename T> struct EnableIfT<true,T> { using type = T; };
template <typename T> struct IsAType : TrueType {};
template <typename T, typename=typename EnableIfT<IsAType<T>::value,int>::type>
int SomeFunc(T const&);
template <typename T, typename=typename EnableIfT<IsAType<T>::value,int>::type>
int SomeFunc(SomeClassTemplate<T> const&) { return -1; }
template int SomeFunc(SomeClassTemplate<double> const&);
<stdin>:16:14: error: ambiguous template specialization ‘SomeFunc<>’ for ‘int
SomeFunc(const SomeClassTemplate<double>&)’
<stdin>:11:5: note: candidates are: ‘template<class T, class> int
SomeFunc(const T&)’
<stdin>:14:5: note: ‘template<class T, class> int
SomeFunc(const SomeClassTemplate<T>&)’