diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2013-12-10 15:38:23 +0800 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2013-12-10 15:39:34 +0800 |
commit | 61130f65a921dd019efcb042e31b52e71d516194 (patch) | |
tree | 1ffc08c66b2fc7a4d5e92ed75527040d968cc690 /gcc-4.8/gcc/testsuite/g++.dg | |
parent | 03518e5fd50ca1389a55a9d443d7277ec03d1cde (diff) | |
download | toolchain_gcc-61130f65a921dd019efcb042e31b52e71d516194.tar.gz toolchain_gcc-61130f65a921dd019efcb042e31b52e71d516194.tar.bz2 toolchain_gcc-61130f65a921dd019efcb042e31b52e71d516194.zip |
[4.8] backport fix for partial specialization of template
2013-12-05 Jason Merrill <jason@redhat.com>
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
Diffstat (limited to 'gcc-4.8/gcc/testsuite/g++.dg')
-rw-r--r-- | gcc-4.8/gcc/testsuite/g++.dg/template/partial14.C | 16 |
1 files changed, 16 insertions, 0 deletions
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 T> +class C { +private: + template <T a, T b> + struct Implementation {}; +public: + typedef typename Implementation<0, 0>::Typedef Type; +}; + +template <class T> +template <T b> +struct C<T>::Implementation<0, b> { typedef void Typedef; }; + +template class C<unsigned>; |