--- Comment #1 from pcarlini at suse dot de 2007-11-25 01:01 ---
Doug, can you have a look? Adding the missing definitions moves the error to
link-time but it persists: something seems indeed fishy in the front-end code
for static constant members vs variadic templates...
--
pcarlini
--- Comment #2 from pinskia at gcc dot gnu dot org 2007-11-25 03:15 ---
value = MAX_EXPR <(int) value, 1>
Which means we did not "inline" the value of the other value.
Confirmed.
--
pinskia at gcc dot gnu dot org changed:
What|Removed |Added
---
--
dgregor at gcc dot gnu dot org changed:
What|Removed |Added
AssignedTo|unassigned at gcc dot gnu |dgregor at gcc dot gnu dot
|dot org
--- Comment #3 from rbuergel at web dot de 2008-01-19 22:38 ---
another testcase:
template class Comp, typename... T> void f( T... Value)
{
static_assert( Comp::value > 0, "" );
}
template
struct Foo
{
static const int value=1;
};
int main()
{
f( 2 );
}
--
http
--
jason at gcc dot gnu dot org changed:
What|Removed |Added
AssignedTo|dgregor at gcc dot gnu dot |unassigned at gcc dot gnu
|org
--- Comment #4 from dgregor at gcc dot gnu dot org 2008-01-28 23:40 ---
There are some problems with the example code. For example, the expression
max does not expand the parameter pack "Params". The compiler should
have warned you about this, both in this case and in the static_assert c
--- Comment #5 from rbuergel at web dot de 2008-01-29 10:17 ---
for #3, using static_assert( Comp::value > 0, "" ); makes it work.
using max for #1 leads gcc to an error: "cannot expand 'Params
...' into a fixed-length argument list"
updated testcase:
template
struct max
{
st
--- Comment #7 from dgregor at gcc dot gnu dot org 2008-01-29 14:22 ---
Actually, I don't know whether max is valid or not. My
inclination is that it is invalid, because when Params is empty, it becomes an
invalid specialization max. (This happens, for example, if we try to compute
max::
--- Comment #8 from dgregor at gcc dot gnu dot org 2008-01-29 14:24 ---
Fixed on mainline
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34219
--- Comment #6 from dgregor at gcc dot gnu dot org 2008-01-29 14:01 ---
Subject: Bug 34219
Author: dgregor
Date: Tue Jan 29 13:59:59 2008
New Revision: 131938
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131938
Log:
2008-01-29 Douglas Gregor <[EMAIL PROTECTED]>
PR c
10 matches
Mail list logo