This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH: faq.html (was: "FAQ patch")

Gerald Pfeifer <> writes:

> Rich, if there are any outstanding patches or mails of yours which I
> haven't addressed in, say 24 hours, please drop me some pointer or resend,
> and I'll have a look ASAP.  (I hope this did not happen, but I might have
> missed something while reducing my huge backlog.)

Joseph has been very patiently vetting my patches for me, so I don't
think there are any outstanding. Here's another I thought of adding,
perhaps you could look at it when you have a moment.

[To be honest, the long lines in diff output - this has always confused
me. What is it we have to avoid, again? Is it enough that my mail
client doesn't wrap long lines, or should I edit long lines prior to
invoking cvs diff? I could make sure everything in existing markup
doesn't go past 70 characters or so if necessary.]

2001-07-03  Rich Churcher  <>

	* Add question to cover lack of export keyword

Index: faq.html
RCS file: /cvs/gcc/wwwdocs/htdocs/faq.html,v
retrieving revision 1.164
diff -u -3 -p -r1.164 faq.html
--- faq.html	2001/07/01 14:48:20	1.164
+++ faq.html	2001/07/02 09:54:22
@@ -63,6 +63,7 @@ page</a>.</p>
     <li><a href="#stdin">Why can't I initialize a static variable with <tt>stdin</tt>?</a></li>
     <li><a href="#macarg">Why can't I use #if here?</a></li>
     <li><a href="#rounding">Problems with floating point computations</a></li>
+    <li><a href="#export">Why can't I put template definitions in a separate file?</a></li>
   <li><a href="#old">Older versions of GCC or EGCS</a></li>
@@ -611,6 +612,20 @@ to round to the nearest representable nu
 the float and double types. Please study 
 <a href="";>this paper</a>
 for more information.</p>
+<h2><a name="export">Why can't I put template definitions in a
+separate file?</a></h2>
+<p>Most C++ compilers (G++ included) do not yet implement the
+<code>export</code> keyword, which is necessary for separate
+compilation of template declarations and definitions. Without
+<code>export</code>, a template definition must be in scope to be
+<p>The obvious workaround is simply to place all definitions in the
+header itself. Alternatively, the compilation unit containing template
+definitions may be included from the header.</p>
 <a name="old"></a>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]