This is the mail archive of the egcs@egcs.cygnus.com mailing list for the EGCS project. See the EGCS home page for more information.


[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

Re: Bug in libm or libstdc++.



On Mar  2, 1999, Paul Derbyshire <pderbysh@usa.net> wrote:

> ['export' is in Stroustrup 3rd Ed.]

> Interesting. There is one lone mention in connection with templates, which
> seems to describe some usage that never actually occurs, namely, putting a
> template in a .cc file and expecting another .cc file to magically be able
> to use it, instead of putting it in a .h file. How would such a scheme be
> implemented anyways?

Well, it doesn't occur because `export' is not widely available yet.
But it probably will be in the future, and then people will probably
start using it.

The C++ Standard allows an implementation to require the translation
unit containing the definition of the exported template to be compiled
before others that depend on it, so it is possible to create databases
with template repositories, but definitely some magic is needed in
order to implement this, and such magic can hardly be made reliable.

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva aoliva@{acm.org,computer.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
Instituto de Computação, Universidade Estadual de Campinas, SP, Brasil