Mail Archives: djgpp/1995/07/08/04:06:46

Xref: comp.os.msdos.djgpp:809
From: axl AT zedat DOT fu-berlin DOT de (Axel Thimm)
Newsgroups: comp.os.msdos.djgpp,
Subject: inline template (member) functions
Date: 8 Jul 1995 02:05:37 GMT
Organization: Freie Unversitaet Berlin
Lines: 27
Nntp-Posting-Host: (
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

this is a known "bug" or better a still unsupported feature of C++ in g++,
and I'd like to know, if there will be (or allready is) a patch for it in
the near future. I know, that the FSF doesn't like predicting the future,
but this might be something that is allready being worked on, so I am
giving it a try.

Inlining template functions (and thus also member functions) doesn't really
inline them the first time invoked. The gcc manual and gcc faq recommend
manually instancing these classes or function templates to avoid the "first
But this is a very hard thing to do, if one has many template classes being
inherited by other template classes. One would have to insert all
instantiations used in between. The code gets rather garbled and changes
are very hard to perform.
I.e. I am using templates that receive integers as arguments defining the
size of the problem. I change those args very often and would be very
confused to do so in about 20 header files. As I am using rather heavy
numerical cpu-power, inlining *is* very important to me.

If anyone knows of a way around it, a patch or anything else, please let me

Axel Thimm
Fachbereich Physik, Freie Universitaet Berlin

- Raw text -

  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019