template instantiations on SUN

S

sunil

reading http://docs.sun.com/source/819-3690/Program_Org.html#37468, I
see there are two ways to instantiate templates: template definitions
included, template definitions separate, does template definitions
separate mean there will be only one copy of instantiated template
code per type ?
Also the compiler options: -instances=static,global,explicit atleast
last three mention they work only with definition included, -
instances=extern doesnt mention anything (does this work with
definition included/separate ) both of them? (http://docs.sun.com/app/
docs/doc/805-4954/6j4mf9fl2?a=view)
What is the default value for this optoin for this sun compiler
version:
CC -V
CC: Sun C++ 5.5 Patch 113817-15 2005/10/25
Thanks
 
M

mlimber

readinghttp://docs.sun.com/source/819-3690/Program_Org.html#37468, I
see there are two ways to instantiate templates: template definitions
included, template definitions separate, does template definitions
separate mean there will be only one copy of instantiated template
code per type ?
Also the compiler options: -instances=static,global,explicit atleast
last three mention they work only with definition included, -
instances=extern doesnt mention anything (does this work with
definition included/separate ) both of them? (http://docs.sun.com/app/
docs/doc/805-4954/6j4mf9fl2?a=view)
What is the default value for this optoin for this sun compiler
version:
CC -V
CC: Sun C++ 5.5 Patch 113817-15 2005/10/25

For your first paragraph, see this FAQ:

http://www.parashift.com/c++-faq-lite/templates.html#faq-35.14

For your second, post in a newsgroup that deals with Sun's tool chain.
This group deals with the standard C++ language proper, not particular
compilers thereof. See this FAQ for what is on-topic here and for some
ideas of where else you might ask:

http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9

Cheers! --M
 
I

Ian Collins

sunil said:
reading http://docs.sun.com/source/819-3690/Program_Org.html#37468, I
see there are two ways to instantiate templates: template definitions
included, template definitions separate, does template definitions
separate mean there will be only one copy of instantiated template
code per type ?
Also the compiler options: -instances=static,global,explicit atleast
last three mention they work only with definition included, -
instances=extern doesnt mention anything (does this work with
definition included/separate ) both of them? (http://docs.sun.com/app/
docs/doc/805-4954/6j4mf9fl2?a=view)
What is the default value for this optoin for this sun compiler
version:
CC -V
CC: Sun C++ 5.5 Patch 113817-15 2005/10/25

See the documentation for the current compiler (yours is very old) and
direct any questions to the Sun Studio forum on forums.sun.com.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top