Commit 5497bd2b by Jason Merrill Committed by Jason Merrill

PR c++/81188 - matching decltype of member function call.

	* tree.c (cp_tree_equal): Remove COMPONENT_REF special case.

From-SVN: r249813
parent becb93d0
2017-06-29 Jason Merrill <jason@redhat.com>
PR c++/81188 - matching decltype of member function call.
* tree.c (cp_tree_equal): Remove COMPONENT_REF special case.
2017-06-29 Nathan Sidwell <nathan@acm.org>
PR c++/81247
......
......@@ -3589,11 +3589,6 @@ cp_tree_equal (tree t1, tree t2)
return false;
return cp_tree_equal (TREE_OPERAND (t1, 1), TREE_OPERAND (t1, 1));
case COMPONENT_REF:
if (TREE_OPERAND (t1, 1) != TREE_OPERAND (t2, 1))
return false;
return cp_tree_equal (TREE_OPERAND (t1, 0), TREE_OPERAND (t2, 0));
case PARM_DECL:
/* For comparing uses of parameters in late-specified return types
with an out-of-class definition of the function, but can also come
......
// PR c++/81188
// { dg-do compile { target c++11 } }
template <class F>
struct C {
F fast(long i) const;
auto operator[](long i) const -> decltype(this->fast(i));
};
template <class F>
auto C<F>::operator[](long i) const -> decltype(this->fast(i)) {
return fast(i);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment