Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
25a96761
Commit
25a96761
authored
13 years ago
by
Jason Merrill
Committed by
Jason Merrill
13 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* pt.c (tsubst_pack_expansion): Fix SFINAE.
From-SVN: r181548
parent
c67dd256
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
1 deletions
+30
-1
gcc/cp/ChangeLog
+2
-0
gcc/cp/pt.c
+3
-1
gcc/testsuite/g++.dg/cpp0x/sfinae30.C
+25
-0
No files found.
gcc/cp/ChangeLog
View file @
25a96761
2011-11-20 Jason Merrill <jason@redhat.com>
* pt.c (tsubst_pack_expansion): Fix SFINAE.
PR c++/48322
* cp-tree.h (PACK_EXPANSION_EXTRA_ARGS): New.
* cp-tree.def (EXPR_PACK_EXPANSION): Add an operand for it.
...
...
This diff is collapsed.
Click to expand it.
gcc/cp/pt.c
View file @
25a96761
...
...
@@ -9350,7 +9350,9 @@ tsubst_pack_expansion (tree t, tree args, tsubst_flags_t complain,
len
=
my_len
;
else
if
(
len
!=
my_len
)
{
if
(
TREE_CODE
(
t
)
==
TYPE_PACK_EXPANSION
)
if
(
!
(
complain
&
tf_error
))
/* Fail quietly. */
;
else
if
(
TREE_CODE
(
t
)
==
TYPE_PACK_EXPANSION
)
error
(
"mismatched argument pack lengths while expanding "
"%<%T%>"
,
pattern
);
...
...
This diff is collapsed.
Click to expand it.
gcc/testsuite/g++.dg/cpp0x/sfinae30.C
0 → 100644
View file @
25a96761
// { dg-do compile { target c++11 } }
template
<
class
...
T
>
struct
tuple
;
template
<
class
T
>
struct
tuple
<
T
>
{
T
t
;
};
template
<
class
T
,
class
U
>
struct
pair
;
template
<>
struct
pair
<
int
,
double
>
{
};
template
<
class
...
Ts
>
struct
A
{
template
<
class
...
Us
,
class
V
=
tuple
<
pair
<
Ts
,
Us
>
...
>
>
static
void
f
(
Us
...)
{
V
v
;
}
template
<
class
U
>
static
void
f
(
bool
);
};
int
main
()
{
A
<
int
,
float
>::
f
<
double
>
(
1
.
0
);
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment