Re: [PATCH] libstdc++: Optimized bind_front/bind_back for zero bound args.

2025-08-26 Thread Tomasz Kaminski
On LWG reflector it was pointed out that returning copy of F, may also impact the result of overload resolution, as without forwarding pointer parameters can be initialized from 0: #include struct S { void operator()(long, long); // 1 void operator()(int, void*); // 2 }; void foo() {

Re: [PATCH] libstdc++: Optimized bind_front/bind_back for zero bound args.

2025-08-26 Thread Jonathan Wakely
On Wed, 20 Aug 2025 at 11:08, Tomasz Kamiński wrote: > > This patch adjusts the implementation of bind_front(f) and bind_back(f) > (with zero bound arguments), so it returns an auto(f) (a copy of the > functor), rather than a specialization of Bind_front/Bind_back. This change > is mostly unobserv

Re: [PATCH] libstdc++: Optimized bind_front/bind_back for zero bound args.

2025-08-26 Thread Patrick Palka
On Wed, 20 Aug 2025, Tomasz Kamiński wrote: > This patch adjusts the implementation of bind_front(f) and bind_back(f) > (with zero bound arguments), so it returns an auto(f) (a copy of the > functor), rather than a specialization of Bind_front/Bind_back. This change > is mostly unobservable, as st

Re: [PATCH] libstdc++: Optimized bind_front/bind_back for zero bound args.

2025-08-24 Thread Tomasz Kaminski
On Wed, Aug 20, 2025 at 12:09 PM Tomasz Kamiński wrote: > This patch adjusts the implementation of bind_front(f) and bind_back(f) > (with zero bound arguments), so it returns an auto(f) (a copy of the > functor), rather than a specialization of Bind_front/Bind_back. This change > is mostly unobse

[PATCH] libstdc++: Optimized bind_front/bind_back for zero bound args.

2025-08-20 Thread Tomasz Kamiński
This patch adjusts the implementation of bind_front(f) and bind_back(f) (with zero bound arguments), so it returns an auto(f) (a copy of the functor), rather than a specialization of Bind_front/Bind_back. This change is mostly unobservable, as standard does not specify return type of above function