This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Implementing normal algorithms using predicate versions
chris jefferson <caj@cs.york.ac.uk> writes:
[...]
| However (as an example), I'm current re-neatening an optimisation of
| search_n (which is why I was asking about if I can'should merge the
| predicate / normal versions), and this has a function which just
| consists of one line which dispatches to the optimised version. I had
| heard that at -O2 gcc won't inline without an explicit "inline" (or
| being defined in a class/struct), so thought that I should either
| declare the dispatch function or the functions dispatched to as
| inline. In general I tend to work on the principle of "more than 5
| lines and it shouldn't be inlined" ::)
Yes, we should use "inline" when we mean inline -- as traditionally
the case -- and pester the front-end when its logic does not agree
with the programmer's written intent.
-- Gaby