From patchwork Thu Mar 8 20:56:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 145625 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 0F649B6EEE for ; Fri, 9 Mar 2012 07:56:50 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1331845011; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=PNoIqbY DyCPyCVNJd894Sw7sCJ8=; b=IOs8ruatZqREHC8RwqADiS64BagrarbDrMT1O03 IGXpZTAY05L1AFhyGxtwiWVGkRfsCxJGlt+5+54FzMO0EWzOUTRJ5oB7YphHrZ3Y wuwfmLPWwnwRNTpXZo7/f6D7s7+LYCdBbcw33Ec/mjxroarLYqGvrSvbUvXDVVUJ 9aCk= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=K4O6wtUJDwA8UWQg89i8/Plrjf5XUOiZdK43OxN/2qGgOXHG4ArDix7QzAHRSO CqHru/qKdHrfFR83Agys6lUmd4ni7ySgpPaGfoq/kAN9Z1YmD4by3NZSzVRXKE47 cKR3k8O54xtiqBNAwzZYneV19IeGu/tnpgm9DYbc7ok6w=; Received: (qmail 26223 invoked by alias); 8 Mar 2012 20:56:45 -0000 Received: (qmail 26214 invoked by uid 22791); 8 Mar 2012 20:56:44 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-lpp01m010-f47.google.com (HELO mail-lpp01m010-f47.google.com) (209.85.215.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 08 Mar 2012 20:56:31 +0000 Received: by lagw12 with SMTP id w12so1033799lag.20 for ; Thu, 08 Mar 2012 12:56:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.23.66 with SMTP id k2mr2742323lbf.64.1331240189758; Thu, 08 Mar 2012 12:56:29 -0800 (PST) Received: by 10.112.117.129 with HTTP; Thu, 8 Mar 2012 12:56:29 -0800 (PST) Date: Thu, 8 Mar 2012 20:56:29 +0000 Message-ID: Subject: Remove anachronistic docs about G++ template instantiation From: Jonathan Wakely To: gcc-patches Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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? 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