re PR c++/43054 ([C++0x] ambiguous overload from identical declarations using decltype)
PR c++/43054 * tree.c (cp_tree_equal): Correct CALL_EXPR logic, handle EXPR_PACK_EXPANSION. From-SVN: r156737
This commit is contained in:
parent
9ab999338b
commit
96b4a0b57e
gcc
@ -1,3 +1,9 @@
|
||||
2010-02-12 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/43054
|
||||
* tree.c (cp_tree_equal): Correct CALL_EXPR logic, handle
|
||||
EXPR_PACK_EXPANSION.
|
||||
|
||||
2010-02-12 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/43033
|
||||
|
@ -2060,7 +2060,9 @@ cp_tree_equal (tree t1, tree t2)
|
||||
arg2 = next_call_expr_arg (&iter2))
|
||||
if (!cp_tree_equal (arg1, arg2))
|
||||
return false;
|
||||
return (arg1 || arg2);
|
||||
if (arg1 || arg2)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
case TARGET_EXPR:
|
||||
@ -2197,6 +2199,10 @@ cp_tree_equal (tree t1, tree t2)
|
||||
return same_type_p (TRAIT_EXPR_TYPE1 (t1), TRAIT_EXPR_TYPE1 (t2))
|
||||
&& same_type_p (TRAIT_EXPR_TYPE2 (t1), TRAIT_EXPR_TYPE2 (t2));
|
||||
|
||||
case EXPR_PACK_EXPANSION:
|
||||
return cp_tree_equal (PACK_EXPANSION_PATTERN (t1),
|
||||
PACK_EXPANSION_PATTERN (t2));
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
2010-02-12 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/43054
|
||||
* g++.dg/cpp0x/variadic99.C: New.
|
||||
|
||||
2010-02-12 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* gcc.dg/guality/guality.h (GUALCVT): Zero extend instead of
|
||||
|
22
gcc/testsuite/g++.dg/cpp0x/variadic99.C
Normal file
22
gcc/testsuite/g++.dg/cpp0x/variadic99.C
Normal file
@ -0,0 +1,22 @@
|
||||
// PR c++/43054
|
||||
// { dg-options "-std=c++0x" }
|
||||
|
||||
template<typename R> struct future { };
|
||||
|
||||
template<typename Fn, typename... Args>
|
||||
auto
|
||||
async(Fn&& fn, Args&&... args)
|
||||
-> future<decltype(fn(args...))>;
|
||||
|
||||
template<typename Fn, typename... Args>
|
||||
auto
|
||||
async(Fn&& fn, Args&&... args)
|
||||
-> future<decltype(fn(args...))>;
|
||||
|
||||
int work2(int value);
|
||||
|
||||
void work(int value)
|
||||
{
|
||||
async(work2, value);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user