Commit ec529e25 by Jason Merrill Committed by Jason Merrill

* pt.c (lookup_template_variable): Always unknown_type_node.

From-SVN: r218045
parent 191ec640
2014-11-24 Jason Merrill <jason@redhat.com>
* pt.c (lookup_template_variable): Always unknown_type_node.
2014-11-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/63786
......
......@@ -8027,18 +8027,13 @@ lookup_template_class (tree d1, tree arglist, tree in_decl, tree context,
}
/* Return a TEMPLATE_ID_EXPR for the given variable template and ARGLIST.
If the ARGLIST refers to any template parameters, the type of the
expression is the unknown_type_node since the template-id could
refer to an explicit or partial specialization. */
The type of the expression is the unknown_type_node since the
template-id could refer to an explicit or partial specialization. */
tree
lookup_template_variable (tree templ, tree arglist)
{
tree type;
if (uses_template_parms (arglist))
type = unknown_type_node;
else
type = TREE_TYPE (templ);
tree type = unknown_type_node;
tsubst_flags_t complain = tf_warning_or_error;
tree parms = INNERMOST_TEMPLATE_PARMS (DECL_TEMPLATE_PARMS (templ));
arglist = coerce_template_parms (parms, arglist, templ, complain,
......
// DR 1727: a specialization doesn't need to have the same type
// { dg-do compile { target c++14 } }
template <class T> T t = 42;
template<> void* t<int> = 0;
template<class T, class U> struct same;
template<class T> struct same<T,T> {};
same<void*,decltype(t<int>)> s;
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