[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_CXX_TEMPLATE_KEYWORD_QUALIFIER VS. GCC 3.4
From: |
MAISONOBE Luc |
Subject: |
Re: AC_CXX_TEMPLATE_KEYWORD_QUALIFIER VS. GCC 3.4 |
Date: |
Wed, 04 Feb 2004 11:10:08 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.6) Gecko/20040202 |
Bernardo Innocenti wrote:
the AC_CXX_TEMPLATE_KEYWORD_QUALIFIER test fails
with GCC 3.4. I believe it's a bug in the test,
but I don't have access to the C++ standard to
verify.
Hello,
I think the code is good, but I am not sure. In fact, I did implement
all these tests as autoconf tests, but am not the original author, it is
Todd Veldhuizen (I will send a separate mail in a few minutes to correct
the attributions).
I only have the 2 December 1996 draft handy yet, I am not sure the
standard says the same. Here is an extract of the relevant paragraph.
Could you check if it does work with gcc 3.4 ?
[ ... extract from 1996 draft,
section 14.2 Names of templates specializations ... ]
When the name of a member template specialization appears after . or ->
in a postfix-expression, or after :: in a qualified-id that explicitely
depends on a template-argument (14.6.2), the member template name must
be prefixed by the keyword template. Otherwise the name is assumed to
name a non-template.
[Example:
class X {
public:
template<size_t> X* allox();
};
void f(X* p)
{
X* p1 = p->alloc<200>();
// ill-formed: < means less than
X* p2 = p->template allox<200>();
// fine: < starts explicit qualification
}
--end example]