Commit 712467a4 by Nathan Sidwell Committed by Nathan Sidwell

pt.c (unify, ARRAY_TYPE): Element type can be more qualified.

cp:
	* pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
testsuite:
	* g++.dg/template/deduce1.C: New test.

From-SVN: r57120
parent 32b4f6f4
2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
2002-09-13 Kazu Hirata <kazu@cs.umass.edu> 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
* decl.c: Fix comment formatting. * decl.c: Fix comment formatting.
......
...@@ -8921,7 +8921,7 @@ unify (tparms, targs, parm, arg, strict) ...@@ -8921,7 +8921,7 @@ unify (tparms, targs, parm, arg, strict)
TYPE_DOMAIN (arg), UNIFY_ALLOW_NONE) != 0) TYPE_DOMAIN (arg), UNIFY_ALLOW_NONE) != 0)
return 1; return 1;
return unify (tparms, targs, TREE_TYPE (parm), TREE_TYPE (arg), return unify (tparms, targs, TREE_TYPE (parm), TREE_TYPE (arg),
UNIFY_ALLOW_NONE); strict & UNIFY_ALLOW_MORE_CV_QUAL);
case REAL_TYPE: case REAL_TYPE:
case COMPLEX_TYPE: case COMPLEX_TYPE:
......
2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
* g++.dg/template/deduce1.C: New test.
2002-09-13 Kazu Hirata <kazu@cs.umass.edu> 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
* gcc.c-torture/execute/simd-1.c: Force all use of int to * gcc.c-torture/execute/simd-1.c: Force all use of int to
......
// { dg-do run }
// Copyright (C) 2002 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 13 Sep 2002 <nathan@codesourcery.com>
template <typename T> int Foo (T const *)
{
return 1;
}
template <typename T> int Foo (T const &)
{
return 2;
}
template <typename T, __SIZE_TYPE__ I> int Foo (T const (&ref)[I])
{
return 0;
}
int main ()
{
static int array[4] = {};
return Foo (array);
}
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