From 61130f65a921dd019efcb042e31b52e71d516194 Mon Sep 17 00:00:00 2001 From: Andrew Hsieh Date: Tue, 10 Dec 2013 15:38:23 +0800 Subject: [4.8] backport fix for partial specialization of template 2013-12-05 Jason Merrill PR c++/59044 PR c++/59052 * pt.c (most_specialized_class): Use the partially instantiated template for deduction. Drop the TMPL parameter. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59052 Change-Id: I4760e719def2f5eacac438af2df0b18c1f2d16a8 --- gcc-4.8/gcc/testsuite/g++.dg/template/partial14.C | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 gcc-4.8/gcc/testsuite/g++.dg/template/partial14.C (limited to 'gcc-4.8/gcc/testsuite') diff --git a/gcc-4.8/gcc/testsuite/g++.dg/template/partial14.C b/gcc-4.8/gcc/testsuite/g++.dg/template/partial14.C new file mode 100644 index 000000000..3870164f0 --- /dev/null +++ b/gcc-4.8/gcc/testsuite/g++.dg/template/partial14.C @@ -0,0 +1,16 @@ +// PR c++/59044 + +template +class C { +private: + template + struct Implementation {}; +public: + typedef typename Implementation<0, 0>::Typedef Type; +}; + +template +template +struct C::Implementation<0, b> { typedef void Typedef; }; + +template class C; -- cgit v1.2.3