Date: Thu, 04 May 2023 12:17:16 -0700
On Thursday, 4 May 2023 11:11:57 PDT Jonathan Wakely via Std-Proposals wrote:
> > I mean the one available in current TU.
>
> And then you break every inline function that uses a local static variable.
Plus you increase code size. If the compiler is choosing not to inline this
function, it's probably because it considers it too big for inlining. If
multiple TUs are suffering from this, why not then share the same out-of-line
copy?
Besides, if this is the behaviour you want for your inline function, just tack
a "static" to its declaration and you get it.
What's the problem that you're trying to solve here anyway?
>
> > On Thu, May 4, 2023 at 8:26 PM sasho648 <sasho648_at_[hidden]> wrote:
> >> Well just require an implementation to use the inline version, if it's
> >> available.
> > I mean the one available in current TU.
>
> And then you break every inline function that uses a local static variable.
Plus you increase code size. If the compiler is choosing not to inline this
function, it's probably because it considers it too big for inlining. If
multiple TUs are suffering from this, why not then share the same out-of-line
copy?
Besides, if this is the behaviour you want for your inline function, just tack
a "static" to its declaration and you get it.
What's the problem that you're trying to solve here anyway?
>
> > On Thu, May 4, 2023 at 8:26 PM sasho648 <sasho648_at_[hidden]> wrote:
> >> Well just require an implementation to use the inline version, if it's
> >> available.
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Software Architect - Intel DCAI Cloud Engineering
Received on 2023-05-04 19:17:20