From: Dodji Seketeli <dodji@redhat.com>
To: Gabriel Dos Reis <gdr@integrable-solutions.net>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>, Jason Merrill <jason@redhat.com>
Subject: Re: [PATCH] PR c++/52343 - error with alias template as template template argument
Date: Fri, 21 Dec 2012 16:26:00 -0000 [thread overview]
Message-ID: <8738yz4bk6.fsf@redhat.com> (raw)
In-Reply-To: <CAAiZkiCWPDD8tXkBubNS_rvOHAjB7XkJG_cUyRkKUWdUOhJ+sQ@mail.gmail.com> (Gabriel Dos Reis's message of "Fri, 21 Dec 2012 09:11:35 -0600")
Gabriel Dos Reis <gdr@integrable-solutions.net> writes:
> The example is valid, but I am not sure I understand your
> explanation...
Ah, sorry. I realize just now that I haven't mentioned the initial
erratic behaviour. Maybe that could have made my message easier to
understand.
So consider the test case of the message:
1 template<typename>
2 using A = int;
3
4 template<template<class> class>
5 struct B {};
6
7 B<A> b;
test.cc:7:4: error: integral expression ‘A’ is not constant
B<A> b;
^
Followed by some irrelevant other error messages.
As I was saying my earlier message, here, the TREE_TYPE of the
template_decl A is an integer; so check_instantiated_arg takes it as
if A is an integer value (a decl with integer type), and thus, should
be a constant.
The fix I am proposing is just to allow check_instantiated_arg to make
the difference between a classical integer decl, and an alias template
which type-id is an integer.
--
Dodji
next prev parent reply other threads:[~2012-12-21 16:26 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 [this message]
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
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=8738yz4bk6.fsf@redhat.com \
--to=dodji@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gdr@integrable-solutions.net \
--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).