Commit b2b5f337 by Jason Merrill Committed by Jason Merrill

re PR c++/50870 ([C++0x] [4.6/4.7 Regression] ICE with decltype, operator->, and…

re PR c++/50870 ([C++0x] [4.6/4.7 Regression] ICE with decltype, operator->, and default template arguments)

	PR c++/50870
	* pt.c (tsubst_copy): Handle NAMESPACE_DECL.
	(tsubst_copy_and_build) [COMPONENT_REF]: Handle a still-dependent
	object.

From-SVN: r181131
parent 48d8dd06
2011-11-07 Jason Merrill <jason@redhat.com>
PR c++/50870
* pt.c (tsubst_copy): Handle NAMESPACE_DECL.
(tsubst_copy_and_build) [COMPONENT_REF]: Handle a still-dependent
object.
2011-11-07 Paolo Carlini <paolo.carlini@oracle.com>
* pt.c (tsubst_copy_and_build): Fix qualified_name_lookup_error
......
......@@ -12010,6 +12010,9 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl)
mark_used (t);
return t;
case NAMESPACE_DECL:
return t;
case OVERLOAD:
/* An OVERLOAD will always be a non-dependent overload set; an
overload set from function scope will just be represented with an
......@@ -13871,7 +13874,9 @@ tsubst_copy_and_build (tree t,
if (member == error_mark_node)
return error_mark_node;
if (object_type && !CLASS_TYPE_P (object_type))
if (type_dependent_expression_p (object))
/* We can't do much here. */;
else if (!CLASS_TYPE_P (object_type))
{
if (SCALAR_TYPE_P (object_type))
{
......
2011-11-07 Jason Merrill <jason@redhat.com>
PR c++/50870
* g++.dg/cpp0x/decltype35.C: New.
2011-11-07 Dodji Seketeli <dodji@redhat.com>
Support C++11 alias-declaration
......
// PR c++/50870
// { dg-options -std=c++0x }
template <class V>
struct impl
{
template <class T> static T create();
};
template <class T, class U, class V, class
= decltype(impl<V>::template create<T>()
-> impl<V>::template create<U>())>
struct tester { };
tester<impl<float>*, int, float> ti;
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