473,803 Members | 3,431 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

template instantiations on SUN

reading http://docs.sun.com/source/819-3690/...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=stati c,global,explic it atleast
last three mention they work only with definition included, -
instances=exter n doesnt mention anything (does this work with
definition included/separate ) both of them? (http://docs.sun.com/app/
docs/doc/805-4954/6j4mf9fl2?a=vie w)
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
Aug 13 '08 #1
2 1531
On Aug 13, 12:14*pm, sunil <sunilsreenivas 2...@yahoo.comw rote:
readinghttp://docs.sun.com/source/819-3690/Program_Org.htm l#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=stati c,global,explic it atleast
last three mention they work only with definition included, -
instances=exter n doesnt mention anything (does this work with
definition included/separate ) both of them? (http://docs.sun.com/app/
docs/doc/805-4954/6j4mf9fl2?a=vie w)
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-lit...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-lit...t.html#faq-5.9

Cheers! --M
Aug 13 '08 #2
sunil wrote:
reading http://docs.sun.com/source/819-3690/...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=stati c,global,explic it atleast
last three mention they work only with definition included, -
instances=exter n doesnt mention anything (does this work with
definition included/separate ) both of them? (http://docs.sun.com/app/
docs/doc/805-4954/6j4mf9fl2?a=vie w)
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.

--
Ian Collins.
Aug 13 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2108
by: Agent Mulder | last post by:
Hi group, I try to get a reference to a template. In the template, a virtual function is declared. Later in the program, I inherit from classes created by the template. So the template is the base of them all. Because I don't know what classes I am dealing with, I try to get a reference to the base class. Since the base class is a template instaniation, I cannot find a common type for all classes that
17
2043
by: Jacek Dziedzic | last post by:
Hello! I have a templated class that serves as a simple vector of elements. template <typename T> class simple_vector : public math_object { // ... lots of simple_vector operations // the trouble begins here:
5
5307
by: nifsmith | last post by:
Hi I am trying to learn about Queues and use templates at the same time. I have written the following code and I am getting a link error, stating "unresolved external symbol, "int__cdecl adsq::QInitialise<struct adsq::Data>(struct adsq::Head<struct adsq::Data> *)" -----------adsq.h file
8
1455
by: | last post by:
This code get's a link error (I'm guessing because the template isn't being instantiated)... // For using templates to simplify deleting items template <class T> // Returns the next ADHL in the list AbstractDataHolderList* // Used to delete this object and the item it points to AbstractDataHolderList::DeleteThisItem(void) {
1
1565
by: Tony Johansson | last post by:
Hello Experts! I reading a book called programming with design pattern revealed by Tomasz Muldner and here I read something that I don't understand completely. Im I right if I say the following. In this case is the derived class a class template and the base class a class template. Both the base class and the derived class will be instansiated with some
8
3157
by: Tony Johansson | last post by:
Hello Experts! What does this mean actually. If you have a template with a type and non-type template argument, say, like this template<typename T, int a> class Array {. . .}; then A<int, 1> and A<int, 2> are different types. Now, if the A template
3
2739
by: sks | last post by:
Hello all Is the usage of extern keyword valid for telling the compiler to NOT instantiate a template and to link it from an another binary? For example: Suppose module A's binary contains a template class called "myTemplate", for which there is an instantiation for 'int' type. Now suppose a class in module B binary wants to use this template
2
980
by: Boni | last post by:
Dear all, ist it possible to have a template class or func as friend of other class: Folowing returns syntax errors template< typename T> class test{}; template< typename T> int func (Ta); class A{ friend class test;
2
2195
by: Joseph Turian | last post by:
I'm posting this question for a friend who lacks USENET access. He and I were discussing this question and could not figure out the solution. Thank you for your help Joseph ===
5
3755
by: aryan | last post by:
Is it not allowed to have template function definition in a .cc file? Here is the scenario. The tempage function declaration is in a header file and the definition in a .cc file. The function is called in main which is in another .cc file. With g++ compiler, this fails to link.However, it compiles if the template function definitioin also included in header file. Is there a way with g++ to force template function in .cc file?
0
9703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9564
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10295
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9125
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7604
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5500
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.