public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: "Giovanni Bajo" <giovannibajo@libero.it>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: c++/9634: [3.4 regression] Problems with templates (SFINAE)
Date: Thu, 01 May 2003 14:06:00 -0000	[thread overview]
Message-ID: <20030501140601.31051.qmail@sources.redhat.com> (raw)

The following reply was made to PR c++/9634; it has been noted by GNATS.

From: "Giovanni Bajo" <giovannibajo@libero.it>
To: <gcc-gnats@gcc.gnu.org>,
	<gcc-bugs@gcc.gnu.org>,
	<nobody@gcc.gnu.org>,
	<gcc-prs@gcc.gnu.org>,
	<poschmid@lbl.gov>
Cc:  
Subject: Re: c++/9634: [3.4 regression] Problems with templates (SFINAE)
Date: Thu, 1 May 2003 15:59:01 +0200

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9634
 
 Yes, this is DR224
 (http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_defects.html#224), which is
 in WP status (so the resolution will be adopted in the next version of the
 standard). Basically, this PR can be sumed up in the following code:
 
 --------------------------------------
 template <typename T>
 struct A
 {
     typedef int Bar;
 
     template <typename>
     struct N {};
 
     typedef Bar          type1;
     typedef A::Bar       type2;
     typedef A<T>::Bar    type3;
 
     typedef N<int>       type4;
     typedef A::N<int>    type5;
     typedef A<T>::N<int> type6;
 };
 --------------------------------------
 pr9634.cpp:10: error: ISO C++ forbids declaration of `Bar' with no type
 pr9634.cpp:10: error: expected `;'
 pr9634.cpp:11: error: ISO C++ forbids declaration of `Bar' with no type
 pr9634.cpp:11: error: expected `;'
 pr9634.cpp:14: error: `N<int>' specified as declarator-id
 pr9634.cpp:14: error: expected `;'
 pr9634.cpp:15: error: `N<int>' specified as declarator-id
 pr9634.cpp:15: error: expected `;'
 
 The code is legal and should be accepted by GCC. It's rejected from 3.4
 (which first disables the implicit typename/template extensions).
 
 NOTE for the fixer: I suggest to prepare a testcase using the official
 examples present in the above link, which tests all the conditions for both
 success and failure.
 
 Giovanni Bajo
 


             reply	other threads:[~2003-05-01 14:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-01 14:06 Giovanni Bajo [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-02-09 23:45 paolo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030501140601.31051.qmail@sources.redhat.com \
    --to=giovannibajo@libero.it \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).