Click here to Skip to main content
16,008,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: CSimpleArray ? Pin
Jörgen Sigvardsson15-Dec-02 4:29
Jörgen Sigvardsson15-Dec-02 4:29 
GeneralHelp with context menu programming. Pin
trustno114-Dec-02 15:43
trustno114-Dec-02 15:43 
GeneralTemplate class question... Pin
Matt Gullett14-Dec-02 14:56
Matt Gullett14-Dec-02 14:56 
GeneralRe: Template class question... Pin
Taka Muraoka14-Dec-02 15:51
Taka Muraoka14-Dec-02 15:51 
GeneralRe: Template class question... Pin
Matt Gullett14-Dec-02 16:03
Matt Gullett14-Dec-02 16:03 
GeneralRe: Template class question... Pin
Taka Muraoka14-Dec-02 16:17
Taka Muraoka14-Dec-02 16:17 
GeneralRe: Template class question... Pin
Matt Gullett14-Dec-02 16:45
Matt Gullett14-Dec-02 16:45 
GeneralRe: Template class question... Pin
Taka Muraoka14-Dec-02 16:55
Taka Muraoka14-Dec-02 16:55 
Matt Gullett wrote:
If I need to export a fully-qualified template class from a DLL, the compiler will always compile the whole thing.

I read something a few months back from a compiler vendor (not Microsoft) who had tried to implement something where you could compile a template class into a .LIB that you could distribute *without* having to supply the source. Apparently it was Really Hard to do and they still couldn't get it to work exactly the way you would expect or want.

Templating is a compile-time thing. For example, how do you put this in a DLL so that somebody can use it at *runtime*:

template< typename T><br />
struct Foo<br />
{<br />
   void incrementFoo( T& t ) { ++t ; }<br />
} ;


You don't know what T is until you try to compile something using this class so how can you possibly put it in a DLL (without some kind of pre-compiled template information)?

/taka thinks for a minute...

Unless you mean that VC is compiling everything in a templated class regardless of whether it's used or not. That's (yet another) a problem with VC's template handling, then. It's not supposed to do that.



he he he. I like it in the kitchen! - Marc Clifton (on taking the heat when being flamed)

Awasu v0.4a[^]: A free RSS reader with support for Code Project.

GeneralRe: Template class question... Pin
Matt Gullett14-Dec-02 17:04
Matt Gullett14-Dec-02 17:04 
GeneralRe: Template class question... Pin
Todd Smith14-Dec-02 17:11
Todd Smith14-Dec-02 17:11 
GeneralRe: Template class question... Pin
Matt Gullett14-Dec-02 17:23
Matt Gullett14-Dec-02 17:23 
GeneralHelp on Overlapped Serial IO Pin
work_to_live14-Dec-02 13:44
work_to_live14-Dec-02 13:44 
GeneralRe: Help on Overlapped Serial IO Pin
work_to_live14-Dec-02 14:21
work_to_live14-Dec-02 14:21 
GeneralRe: Help on Overlapped Serial IO Pin
Michael Dunn14-Dec-02 15:55
sitebuilderMichael Dunn14-Dec-02 15:55 
GeneralRe: Help on Overlapped Serial IO Pin
patk14-Dec-02 17:07
patk14-Dec-02 17:07 
GeneralRe: Help on Overlapped Serial IO Pin
work_to_live14-Dec-02 17:57
work_to_live14-Dec-02 17:57 
GeneralRe: Help on Overlapped Serial IO Pin
patk14-Dec-02 18:49
patk14-Dec-02 18:49 
GeneralRe: Help on Overlapped Serial IO Pin
work_to_live14-Dec-02 19:23
work_to_live14-Dec-02 19:23 
GeneralRe: Help on Overlapped Serial IO Pin
work_to_live14-Dec-02 20:01
work_to_live14-Dec-02 20:01 
GeneralRe: Help on Overlapped Serial IO Pin
patk15-Dec-02 2:35
patk15-Dec-02 2:35 
GeneralDeskband remove check Pin
14-Dec-02 13:33
suss14-Dec-02 13:33 
Generalprinting a linked list Pin
Anonymous14-Dec-02 12:06
Anonymous14-Dec-02 12:06 
GeneralRe: printing a linked list Pin
Christian Graus14-Dec-02 12:33
protectorChristian Graus14-Dec-02 12:33 
GeneralRe: printing a linked list Pin
nde_plume14-Dec-02 13:06
nde_plume14-Dec-02 13:06 
GeneralPutting a control bar inside a splitter window Pin
trimtrom14-Dec-02 11:19
trimtrom14-Dec-02 11:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.