Return-Path: Delivered-To: apmail-stdcxx-commits-archive@www.apache.org Received: (qmail 51254 invoked from network); 26 Feb 2008 14:42:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Feb 2008 14:42:06 -0000 Received: (qmail 59692 invoked by uid 500); 26 Feb 2008 14:42:02 -0000 Delivered-To: apmail-stdcxx-commits-archive@stdcxx.apache.org Received: (qmail 59676 invoked by uid 500); 26 Feb 2008 14:42:02 -0000 Mailing-List: contact commits-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list commits@stdcxx.apache.org Received: (qmail 59666 invoked by uid 99); 26 Feb 2008 14:42:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Feb 2008 06:42:02 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Feb 2008 14:41:36 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CA8DE1A9832; Tue, 26 Feb 2008 06:41:45 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r631232 - in /stdcxx/branches/4.2.x/etc/config/src: EXTERN_FUNCTION_TEMPLATE.cpp extern_function_template_imp.cpp extern_function_template_imp.h Date: Tue, 26 Feb 2008 14:41:45 -0000 To: commits@stdcxx.apache.org From: faridz@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080226144145.CA8DE1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: faridz Date: Tue Feb 26 06:41:44 2008 New Revision: 631232 URL: http://svn.apache.org/viewvc?rev=631232&view=rev Log: 2008-02-26 Farid Zaripov Merged r627616 from trunk. * etc/config/src/extern_function_template_imp.h: New header file to check the extern function templates. * etc/config/src/extern_function_template_imp.cpp: Removed definitions of struct S<> and foobar<>(), #included extern_function_template_imp.h. * etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp: Ditto. Added: stdcxx/branches/4.2.x/etc/config/src/extern_function_template_imp.h - copied unchanged from r631225, stdcxx/trunk/etc/config/src/extern_function_template_imp.h Modified: stdcxx/branches/4.2.x/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp stdcxx/branches/4.2.x/etc/config/src/extern_function_template_imp.cpp Modified: stdcxx/branches/4.2.x/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp?rev=631232&r1=631231&r2=631232&view=diff ============================================================================== --- stdcxx/branches/4.2.x/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp (original) +++ stdcxx/branches/4.2.x/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp Tue Feb 26 06:41:44 2008 @@ -22,39 +22,23 @@ * **************************************************************************/ -// establish a dependency on extern_function_template_imp.{cpp,o} +// include a file containing the definition of a template +// and an extern template directive referencing an explicit +// instantiation of the same template in extern_function_template_imp.o + +#include "extern_function_template_imp.h" + +// establish a dependency on extern_function_template_imp.o to make sure +// the extern_function_template_imp.cpp is compiled before this file #ifndef _RWSTD_NO_extern_function_template_imp -// link the object file produced by compiling this file -// with the object file below +// link with the object file below // LDOPTS = extern_function_template_imp.o #endif // _RWSTD_NO_extern_function_template_imp - -template -struct S -{ - T t; -}; - - -template -S foobar (S s) -{ - // foobar() explicitly instantiated in extern_function_template_imp.cpp - // is defined to set s.t to 1 - s.t = -1; - - return s; -} - -extern template S foobar (S); - int main () { - // S::bar () is defined to return 1 in extern_function_template_imp.o - S s; int res = 0; Modified: stdcxx/branches/4.2.x/etc/config/src/extern_function_template_imp.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/etc/config/src/extern_function_template_imp.cpp?rev=631232&r1=631231&r2=631232&view=diff ============================================================================== --- stdcxx/branches/4.2.x/etc/config/src/extern_function_template_imp.cpp (original) +++ stdcxx/branches/4.2.x/etc/config/src/extern_function_template_imp.cpp Tue Feb 26 06:41:44 2008 @@ -21,21 +21,6 @@ * **************************************************************************/ -template -struct S -{ - T t; -}; - -template -S foobar (S s) -{ - s.t = 1; - - return s; -} - -template S foobar (S); - -// extern template S foobar(S) declared -// in EXTERN_FUNCTION_TEMPLATE.cpp returns -1 +// explicitly instantiate the template defined in the header +#define INSTANTIATE +#include "extern_function_template_imp.h"