Re: [PATCH 03/24] gdb: make interps_notify work with references

Simon Marchi
2023-10-11T14:18:52Z

On 10/11/23 04:48, Lancelot SIX wrote:
>> diff --git a/gdb/interps.c b/gdb/interps.c
>> index f91b2b62c1ba..62a30583e8c0 100644
>> --- a/gdb/interps.c
>> +++ b/gdb/interps.c
>> @@ -358,15 +358,15 @@ current_interpreter (void)
>> /* Helper interps_notify_* functions. Call METHOD on the top-level interpreter
>> of all UIs. */
>>
>> -template <typename ...Args>
>> +template <typename MethodType, typename ...Args>
>> void
>> -interps_notify (void (interp::*method) (Args...), Args... args)
>> +interps_notify (MethodType method, Args&&... args)
>> {
>> SWITCH_THRU_ALL_UIS ()
>> {
>> interp *tli = top_level_interpreter ();
>> if (tli != nullptr)
>> - (tli->*method) (args...);
>> + (tli->*method) (std::forward<Args>(args)...);
> ^
>
> Space missing before the "(".
>
> Best,
> Lancelot.

Thanks, fixed locally.

Simon