www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/07/08/04:06:46

Xref: news-dnh.mv.net comp.os.msdos.djgpp:809 gnu.g++.help:2350
Path: news-dnh.mv.net!mv!news.sprintlink.net!EU.net!Germany.EU.net!nntp.gmd.de!news.rwth-aachen.de!uni-paderborn.de!golden-gate.owl.de!fu-berlin.de!axl.dialup.fu-berlin.DE!not-for-mail
From: axl AT zedat DOT fu-berlin DOT de (Axel Thimm)
Newsgroups: comp.os.msdos.djgpp,gnu.g++.help
Subject: inline template (member) functions
Date: 8 Jul 1995 02:05:37 GMT
Organization: Freie Unversitaet Berlin
Lines: 27
Nntp-Posting-Host: axl.dialup.fu-berlin.de (160.45.218.93)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

Hello,
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
occurence".
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
know.

Regards,
Axel Thimm
Fachbereich Physik, Freie Universitaet Berlin

- Raw text -


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