Commit a4d66d7d by Jason Merrill Committed by Jason Merrill

re PR c++/65333 (error: incomplete type used in nested name specifier)

	PR c++/65333
	DR 1558
	* pt.c (dependent_type_p_r): Check both class and alias template args.

From-SVN: r221328
parent c4234544
2015-03-10 Jason Merrill <jason@redhat.com>
PR c++/65333
DR 1558
* pt.c (dependent_type_p_r): Check both class and alias template args.
2015-03-10 Jakub Jelinek <jakub@redhat.com> 2015-03-10 Jakub Jelinek <jakub@redhat.com>
PR c/65120 PR c/65120
......
...@@ -20930,7 +20930,13 @@ dependent_type_p_r (tree type) ...@@ -20930,7 +20930,13 @@ dependent_type_p_r (tree type)
return true; return true;
/* ... or any of the template arguments is a dependent type or /* ... or any of the template arguments is a dependent type or
an expression that is type-dependent or value-dependent. */ an expression that is type-dependent or value-dependent. */
else if (TYPE_TEMPLATE_INFO (type) else if (CLASS_TYPE_P (type) && CLASSTYPE_TEMPLATE_INFO (type)
&& (any_dependent_template_arguments_p
(INNERMOST_TEMPLATE_ARGS (CLASSTYPE_TI_ARGS (type)))))
return true;
/* For an alias template specialization, check the arguments both to the
class template and the alias template. */
else if (alias_template_specialization_p (type)
&& (any_dependent_template_arguments_p && (any_dependent_template_arguments_p
(INNERMOST_TEMPLATE_ARGS (TYPE_TI_ARGS (type))))) (INNERMOST_TEMPLATE_ARGS (TYPE_TI_ARGS (type)))))
return true; return true;
......
// PR c++/65333
// { dg-do compile { target c++11 } }
template <typename T, T... Values> struct A
{
using type = int;
template <type... Suffix> using array = A<type, Values..., Suffix...>;
void
m_fn1 ()
{
array<>::data;
}
};
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