diff mbox

Remove anachronistic docs about G++ template instantiation

Message ID CAH6eHdROUCZj=-B3pgP2qpZsMw6Cch1M9ezQfhHaY4tmoJxDVA@mail.gmail.com
State New
Headers show

Commit Message

Jonathan Wakely March 8, 2012, 8:56 p.m. UTC
The manual claims a future version of G++ will support a hybrid
instantiation model, which I don't think is still planned, and
describes extern templates as an extension when they are in C++11.

        * doc/extend.texi (Template Instantiation): Remove anachronisms.

OK for trunk?

Comments

Gerald Pfeifer March 18, 2012, 2:56 p.m. UTC | #1
On Thu, 8 Mar 2012, Jonathan Wakely wrote:
> The manual claims a future version of G++ will support a hybrid
> instantiation model, which I don't think is still planned, and
> describes extern templates as an extension when they are in C++11.
> 
>         * doc/extend.texi (Template Instantiation): Remove anachronisms.

I was waiting for a C++ frontend maintainer to chime in.  The
patch per se looks good to me, and based on some others mails
around template instantiations I think you can go ahead.

Gerald
Jonathan Wakely March 20, 2012, 5:47 p.m. UTC | #2
On 18 March 2012 14:56, Gerald Pfeifer wrote:
> On Thu, 8 Mar 2012, Jonathan Wakely wrote:
>> The manual claims a future version of G++ will support a hybrid
>> instantiation model, which I don't think is still planned, and
>> describes extern templates as an extension when they are in C++11.
>>
>>         * doc/extend.texi (Template Instantiation): Remove anachronisms.
>
> I was waiting for a C++ frontend maintainer to chime in.  The
> patch per se looks good to me, and based on some others mails
> around template instantiations I think you can go ahead.

Thanks, committed to trunk.
diff mbox

Patch

diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index c770e35..91f429d 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -15184,16 +15184,7 @@  GNU/Linux or Solaris 2, or on Microsoft Windows, G++ supports the
 Borland model.  On other systems, G++ implements neither automatic
 model.
 
-A future version of G++ will support a hybrid model whereby the compiler
-will emit any instantiations for which the template definition is
-included in the compile, and store template definitions and
-instantiation context information into the object file for the rest.
-The link wrapper will extract that information as necessary and invoke
-the compiler to produce the remaining instantiations.  The linker will
-then combine duplicate instantiations.
-
-In the mean time, you have the following options for dealing with
-template instantiations:
+You have the following options for dealing with template instantiations:
 
 @enumerate
 @item
@@ -15255,9 +15246,10 @@  compile it without @option{-fno-implicit-templates} so you get all of the
 instances required by your explicit instantiations (but not by any
 other files) without having to specify them as well.
 
-G++ has extended the template instantiation syntax given in the ISO
-standard to allow forward declaration of explicit instantiations
-(with @code{extern}), instantiation of the compiler support data for a
+The ISO C++ 2011 standard allows forward declaration of explicit
+instantiations (with @code{extern}). G++ supports explicit instantiation
+declarations in C++98 mode and has extended the template instantiation
+syntax to support instantiation of the compiler support data for a
 template class (i.e.@: the vtable) without instantiating any of its
 members (with @code{inline}), and instantiation of only the static data
 members of a template class, without the support data or member