This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] [PR8929] Detect spurious template header in memberdefinition
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Giovanni Bajo <giovannibajo at libero dot it>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 24 Nov 2004 10:19:46 +0000
- Subject: Re: [C++ PATCH] [PR8929] Detect spurious template header in memberdefinition
- Organization: Codesourcery LLC
- References: <186301c4d04b$f7868790$2fb82997@bagio>
Giovanni Bajo wrote:
cp/
PR c++/8929
* decl.c (start_decl): Check for invalid specialization headers.
testsuite/
PR c++/8929
* g++.old-deja/g++.oliva/template10.C: Remove xfail.
This is ok.
+ if (processing_specialization
+ && template_class_depth (context) == 0
+ && CLASSTYPE_TEMPLATE_SPECIALIZATION (context))
+ error ("definitions of members of explicitly-specialized "
+ "classes do not require %<template <>%>");
Might I suggest
"template header not allowed in member definition of explicitly specialized class"
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk