cp:
* pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
testsuite:
* g++.dg/template/deduce1.C: New test.
From-SVN: r57120
+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>
* decl.c: Fix comment formatting.
TYPE_DOMAIN (arg), UNIFY_ALLOW_NONE) != 0)
return 1;
return unify (tparms, targs, TREE_TYPE (parm), TREE_TYPE (arg),
- UNIFY_ALLOW_NONE);
+ strict & UNIFY_ALLOW_MORE_CV_QUAL);
case REAL_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>
* gcc.c-torture/execute/simd-1.c: Force all use of int to
--- /dev/null
+// { 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);
+}
+