This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Implementing normal algorithms using predicate versions
Paolo Carlini <pcarlini@suse.de> writes:
| Nathan Myers wrote:
|
| >Historical note... in the original STL, almost everything was marked
| >inline so that it could all be put in header files, without need for
| > all the bother and variation around .o files, object libraries, and
| > linking. Probably the inlines Gaby cites are leftovers from that.
| >
| > Stepanov thought that the number of different uses the tree-based
| > types in any given program would be small enough that inlining
| > wouldn't cost
| > much; also, that the compiler could make the choice to un-inline a
| > function marked inline but "too big", but would not choose the
| > reverse.
| >
| Thanks for the (interesting) note!
|
| Which is your opinion about my point (i.e, some times, for various reasons,
| -O2 is not usable and perhaps we don't want to penalize too much from the
| performance point of view unoptimized build)?!? I'm certainly up for Gaby/
| Benjamin/Chris proposal, but that issue worries me a little bit...
Here we get a function object with _simple_ one-liner inline operator().
-- Gaby