Thread View: comp.std.c++
3 messages
3 total messages
Started by Ari Juhani Huttunen
Fri, 29 Mar 1991 13:38
Compiled templates?
Author: Ari Juhani Huttunen
Date: Fri, 29 Mar 1991 13:38
Date: Fri, 29 Mar 1991 13:38
8 lines
793 bytes
793 bytes
Is it possible to distribute compiled templates in binary form, so that the user can use them as templates, or do you have to supply the source code for them? (As I understand it, distribution of compiled libraries is something that is required of c++ to be successful.) -- Ari Huttunen, email: Ari.Huttunen@hut.fi, phone: 90-7285944
Re: Compiled templates?
Author: Tony L. Hansen
Date: Fri, 29 Mar 1991 18:49
Date: Fri, 29 Mar 1991 18:49
34 lines
2507 bytes
2507 bytes
< From: Ari.Huttunen@hut.fi (Ari Juhani Huttunen) < Is it possible to distribute compiled templates in binary form, so that < the user can use them as templates, or do you have to supply the source < code for them? < (As I understand it, distribution of compiled libraries is something < that is required of c++ to be successful.) Since templates don't exist yet, the answer is certainly no right now. However, in the future, the answer will be a definite maybe! :-) Seriously, consider what a template consists of: a model (the template) for a class or function in which some type information is missing. The application program will supply a type at compile time which will be melded with the model to form a real class or function definition. The template will have to be presented to the compiler in some form, but it won't necessarily have to be in source form. If a vendor chooses, it may decide to permit some form of "pre-parsing" to occur on templates. This would allow a library creator to distribute a pre-parsed form of the template instead of raw source. Templates pre-instantiated with certain types might be included in a library, but that is a separate issue. For the application to create a version of the template function or class at compile time, it needs access to the definition of the template and not object. The object code for a class instantiated for one type will be considerably different from the object code for a class instantiated for another type, particularly if one is a built-in type and the other is a class type. Is a pre-parsed version of a template close enough to what you call a compiled template? I think the market place will have to decide. By the way, there are many people who argue the premise that compiled libraries are a must. It is certainly not a given. Tony Hansen hansen@pegasus.att.com, tony@attmail.com att!pegasus!hansen, attmail!tony
Re: Compiled templates?
Author: Ari Juhani Huttunen
Date: Sat, 30 Mar 1991 13:23
Date: Sat, 30 Mar 1991 13:23
19 lines
1612 bytes
1612 bytes
In article <1991Mar29.184915.9063@cbnewsk.att.com> hansen@pegasus.att.com (Tony L. Hansen) writes: > Is a pre-parsed version of a template close enough to what >you call a compiled template? I think the market place will have to decide. Yes, this would give the vendor some kind of copyright protection. If this protection is needed is not for me to decide (but for the market place as you said.) > If a vendor chooses, it may decide to permit some form of >"pre-parsing" to occur on templates. This would allow a library creator to >distribute a pre-parsed form of the template instead of raw source. This has nothing to do with the C++-standard, but it would be profitable to be able to compile the header files alone (to a pre-parsed version.) The header files are not changed as often as the .c-files, but if there are very many header files, this slows down compilation. -- Ari Huttunen, email: Ari.Huttunen@hut.fi, phone: 90-7285944
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads