public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Gabriel Dos Reis <gdr@integrable-solutions.net>
To: Jason Merrill <jason@redhat.com>
Cc: Dodji Seketeli <dodji@redhat.com>, GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] PR c++/52343 - error with alias template as template template argument
Date: Mon, 24 Dec 2012 05:38:00 -0000	[thread overview]
Message-ID: <CAAiZkiD4jmSVc=BgoRJHQsCx_HfFoL=qoLxyvBEoCrKAEVVS4Q@mail.gmail.com> (raw)
In-Reply-To: <50D7E256.6050802@redhat.com>

On Sun, Dec 23, 2012 at 11:04 PM, Jason Merrill <jason@redhat.com> wrote:
> On 12/21/2012 07:35 AM, Dodji Seketeli wrote:
>>
>>     else if (TREE_TYPE (t)
>>            && INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (t))
>> -          && !TREE_CONSTANT (t))
>> +          && !TREE_CONSTANT (t)
>> +          /* Class template and alias template arguments should be OK.
>> */
>> +          && !DECL_TYPE_TEMPLATE_P (t))
>
>
> Instead, let's add a previous else if to catch template template arguments
> (and do nothing) so that when we hit this else if, we know we're dealing
> with a non-type argument.

Thanks; that would make the logic clearer.  I would suggest that we
abstract this series of conjunction into a separate (static inline)
function, e.g. nontype_argument_p.

-- Gaby

  reply	other threads:[~2012-12-24  5:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-21 12:35 Dodji Seketeli
2012-12-21 15:11 ` Gabriel Dos Reis
2012-12-21 16:26   ` Dodji Seketeli
2012-12-21 23:21     ` Gabriel Dos Reis
2012-12-22 15:53       ` Dodji Seketeli
2012-12-22 16:43         ` Gabriel Dos Reis
2012-12-24  5:04 ` Jason Merrill
2012-12-24  5:38   ` Gabriel Dos Reis [this message]
2012-12-24 13:58     ` Dodji Seketeli
2012-12-24 20:18       ` Gabriel Dos Reis
2012-12-24 13:50   ` Dodji Seketeli
2012-12-26 18:55     ` Jason Merrill

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='CAAiZkiD4jmSVc=BgoRJHQsCx_HfFoL=qoLxyvBEoCrKAEVVS4Q@mail.gmail.com' \
    --to=gdr@integrable-solutions.net \
    --cc=dodji@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    /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).