https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123811
--- Comment #3 from Halalaluyafail3 <luigighiron at gmail dot com> ---
(In reply to Patrick Palka from comment #2)
> template<typename T> concept always_true = true;
>
> template<class T> static void foo() { }
> template<class T> requires always_true<T> static void foo() { }
>
> template<class T> static void bar() { }
> template<class T> static void bar() requires always_true<T> { }
>
> struct B {
> template<class T> static void foo() { }
> template<class T> requires always_true<T> static void foo() { }
>
> template<class T> static void bar() { }
> template<class T> static void bar() requires always_true<T> { }
> };
>
> int main(){
> foo<int>(); // _Z3fooIiQ11always_trueIT_EEvv
> bar<int>(); // _Z3barIiEvvQ11always_trueIT_E
> B::foo<int>(); // _ZN1B3fooIiEEvv ???
> B::bar<int>(); // _ZN1B3barIiEEvvQ11always_trueIT_E
> }
I think this program is IFNDR, because of
https://eel.is/c++draft/temp.over.link#7. That is why the original program used
a variable template instead which can be specialized, similar to the
static_assert(always_false<T>) pattern before static_assert(false) normally was
standardized.