diff options
author | dodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-09 17:56:44 +0000 |
---|---|---|
committer | dodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-09 17:56:44 +0000 |
commit | 16146d83a7f28d47b42be6fa7fa8eeabe1c85a39 (patch) | |
tree | 0acb31e568aebeb03f71fd059ddd620dbaed8767 /gcc/testsuite/g++.dg/template/unify11.C | |
parent | e4b33af48d863ec6f38decb87959ddc6cbdc40e1 (diff) | |
download | gcc-16146d83a7f28d47b42be6fa7fa8eeabe1c85a39.tar.gz |
2009-07-09 Dodji Seketeli <dodji@redhat.com>
gcc/cp/ChangeLog:
PR c++/40684
* pt.c (type_unification_real): Use tsubst_template_arg instead
of tsubst to substitute default template arguments.
gcc/testsuite/ChangeLog:
PR c++/40684
* g++.dg/template/unify11.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149423 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg/template/unify11.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/unify11.C | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/unify11.C b/gcc/testsuite/g++.dg/template/unify11.C new file mode 100644 index 00000000000..c8df94b31ca --- /dev/null +++ b/gcc/testsuite/g++.dg/template/unify11.C @@ -0,0 +1,36 @@ +// Contributed by Dodji Seketeli <dodji@redhat.com> +// Origin: PR c++/40684 +// { dg-options "-std=c++0x" } + +struct A +{ +}; + +template <typename S, typename T, typename U, typename S::v = &S::v::s> +typename S::A +foo (S c, T t, U u) +{ +} + +struct B +{ + struct C + { + template <typename U> + C (U t) + { + A a; + A b = foo (this, a, t); // { dg-error "no matching function" } + } + } c; + B () : c (A ()) + { + } +}; + +int +main () +{ + B f; +} + |