<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2448.0">
<TITLE>RE: [LC++]template and gcc</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>> Actually, you don't need the export keyword to prevent </FONT>
<BR><FONT SIZE=2>> redundant code in </FONT>
<BR><FONT SIZE=2>> binaries, you just need smarter linkers to detect duplicate </FONT>
<BR><FONT SIZE=2>> code at link </FONT>
<BR><FONT SIZE=2>> time. The export keyword is (I think) intended mainly to </FONT>
<BR><FONT SIZE=2>> speed up compile </FONT>
<BR><FONT SIZE=2>> time, rather than to reduce code size.</FONT>
</P>
<P><FONT SIZE=2>I *think* it's meant to tell the compiler that a particular</FONT>
<BR><FONT SIZE=2>template will be used by other units of compilation, so the</FONT>
<BR><FONT SIZE=2>compiler/linker/whatever must ensure that the code is generated</FONT>
<BR><FONT SIZE=2>for whatever instanciations are actually used. That will most</FONT>
<BR><FONT SIZE=2>probably be both the compiler and linker. It may reduce compile</FONT>
<BR><FONT SIZE=2>time, but I don't think this was the original goal, which (I</FONT>
<BR><FONT SIZE=2>think, I tried googling it up, but most hits are to pages</FONT>
<BR><FONT SIZE=2>saying "We don't support it") was more a hint to the compiler</FONT>
<BR><FONT SIZE=2>that something would be used somewhere else, and to act</FONT>
<BR><FONT SIZE=2>accordingly.</FONT>
<BR><FONT SIZE=2>Now, it's all fuzzy memory that I have, I could be very wrong,</FONT>
<BR><FONT SIZE=2>in which case I apologize in advance :)</FONT>
</P>
<P><FONT SIZE=2>-- </FONT>
<BR><FONT SIZE=2>Vincent Penquerc'h </FONT>
</P>
</BODY>
</HTML>