https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94960

--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Erich Keane from comment #6)
> (In reply to Jonathan Wakely from comment #5)
> > And if we have to mark every single function as 'inline' then maybe the
> > compiler shouldn't be using it as a hint.
> 
> I don't think the idea is to mark EVERY function 'inline', simply ones that
> are pretty tiny and really good candidates for inlining.

But that's exactly what we do. _M_construct isn't tiny, it has two loops (and
until quite recently, a try-catch block, but that's been replaced). There are
some functions in <bits/basic_string.tcc> which are probably small enough to be
marked 'inline', so I should review those. Not for GCC 12 though.

But in C++20 every function is 'constexpr' now, so every function is inline
anyway, right? Even the large functions that aren't good candidates for
inlining (see also PR 93008). So The 'inline' keyword has lost all meaning in
<string> now.

Reply via email to