Implementing normal algorithms using predicate versions

Nathan Myers ncm-nospam@cantrip.org
Mon Nov 29 04:33:00 GMT 2004


On Mon, Nov 29, 2004 at 01:27:24AM +0100, Paolo Carlini wrote:
> Gabriel Dos Reis wrote:
> 
> >In particular, I've been wondering for a long time whether we really
> >really want the following (in 3.3.x) to be inline :-)
> 
> Seriously, you are right. Only a few hours ago, I was thinking that before
> the release of 4.0, we should really take care of those functions and other
> similar problems (i.e., moving some definitions *.h -> *.tcc)

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.

Of course everything is different now, recommending different choices.

Nathan Myers
ncm-nospam@cantrip.org



More information about the Libstdc++ mailing list