Re: [PATCH] libstdc++: Fix constification in range_formatter::format [PR109162]

2025-04-16 Thread Jonathan Wakely
On Wed, 16 Apr 2025 at 12:54, Tomasz Kamiński wrote: > > The _Rg is deduced to lvalue reference for the lvalue arguments, > and in such case __format::__maybe_const_range<_Rg, _CharT> is always _Rg > (adding const to reference does not change behavior). > > Now we correctly check if _Range = const

[PATCH] libstdc++: Fix constification in range_formatter::format [PR109162]

2025-04-16 Thread Tomasz Kamiński
The _Rg is deduced to lvalue reference for the lvalue arguments, and in such case __format::__maybe_const_range<_Rg, _CharT> is always _Rg (adding const to reference does not change behavior). Now we correctly check if _Range = const remove_reference_t<_Rg> is formattable range, furthermore as ran