* problem with building templates on OSF
@ 1998-09-10 4:00 Sam Dooley
1998-09-11 4:00 ` Ken Block USG
0 siblings, 1 reply; 2+ messages in thread
From: Sam Dooley @ 1998-09-10 4:00 UTC (permalink / raw)
I need to
build an
application
that uses
templates
on OSF
4.0. I
want the
instantiation
of the
template
objects
done in a
repository,
and only 1
copy of
each
object is
created,
instead of
being
instantiated
in all the
object
files that
need it
(which
will
result in
multiple
copies of
each
object
being
created
and the
size of
the object
files get
huge).
It is the
new cxx
compiler
that I am
using. I
tried the
flags
described
in the
documentation.
If I do
specify a
repository
(by -ptr
directory),
instantiation
is done
both in
the
repository
and object
files,
resulting
in
multiple
copies.
But if I
don't, no
instantiation
is done.
In other
words, I
eigher get
multiple
copies or
none. I
wonder if
any of you
know the
right way
to do it?
Also, the
new cxx
compiler
does
compile
time
instantiation.
Is there
any way
for the
new cxx
compiler
to do link
time
instantiation?
Thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: problem with building templates on OSF
1998-09-10 4:00 problem with building templates on OSF Sam Dooley
@ 1998-09-11 4:00 ` Ken Block USG
0 siblings, 0 replies; 2+ messages in thread
From: Ken Block USG @ 1998-09-11 4:00 UTC (permalink / raw)
The default behavior of the compiler is to instantiate the templates in
the repository with only one copy. The behavior you are describing might
be a known bug in the compiler or a user error. It is hard to tell which
it is without seeing what you are doing.
One thing to be sure of , don't declare any non-template variables in a
template implementation file. Read the documentation on implicit
inclusion to understand how the template implementation file gets
included automatically in your source module when it is needed.
If you are sure you are doing everything right, it is possible you have
hit a bug that causes the compiler to drop templates into the object
instead of the repository. It is hard to describe what causes this, but
the used of unused static variables to hold identification strings for
RCS or SCCS was the most common.
We have already fixed this bug and the new compiler has been given to
manufacturing and will be released on 10/9/98.
The current v6.1 compiler (to be released 10/9/98) only does run-time
instantiations. We are investigating adding link line instantiation to
v6.2.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1998-09-11 4:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-09-10 4:00 problem with building templates on OSF Sam Dooley
1998-09-11 4:00 ` Ken Block USG
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox