Topic: Interesting behavior, possibly a C++ BUG
Author: rfg@netcom.com (Ronald F. Guilmette)
Date: Mon, 1 Nov 1993 02:04:01 GMT Raw View
In article <1993Oct21.230041.13132@leland.Stanford.EDU> ledwards@leland.Stanford.EDU (Laurence James Edwards) writes:
>In article <1993Oct21.070221.10977@trl.oz.au>, r.lightwood@trl.oz.au (Liron Lightwood) writes:
>|> I've noticed some interesting behavior which may prove to be a bug in the
>|> way some C++ 3.0 compilers instantiate templates.
>|> [....]
>|> The problem as I see it, is that the compiler tries to instantiate
>|> template classes when it comes across pointers (or references) to template
>|> classes, even though this shouldn't be necessary.
>
>yes I ran into similar problems ...
>...
>Templates, with regard to these kind of mutual dependencies, seem to me to be
>one of the weakest areas of C++. The problem is that instantiation is not under
>the explicit control of the programmer and the rules governing it are a tad
>unpredictable in practice.
I don't believe that this problem can be laid at the feet of the "practice"
of current compilers. Rather, compilers different on when (and whether)
to instantiate parts of templates because we simply do not have any precise
specification of when (exactly) parts of template will or will not be
instantiated.
Such a specification really needs to be embodied in the forthcomming C++
standard.
--
-- Ronald F. Guilmette, Sunnyvale, California -------------------------------
------ domain address: rfg@netcom.com ---------------------------------------
------ uucp address: ...!uunet!netcom.com!rfg -------------------------------