mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-25 13:46:17 +08:00
re PR c++/33342 (ICE in dependent_type_p, at cp/pt.c:15081)
PR c++/33342 * pt.c (most_specialized_class): Set processing_template_decl while tsubsting partial spec args. From-SVN: r128286
This commit is contained in:
parent
fd452cefa9
commit
97c954f700
29
gcc/testsuite/g++.dg/template/mem-partial3.C
Normal file
29
gcc/testsuite/g++.dg/template/mem-partial3.C
Normal file
@ -0,0 +1,29 @@
|
||||
// PR c++/33342
|
||||
|
||||
template <bool B, class T = void>
|
||||
struct enable_if_c {
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct A
|
||||
{
|
||||
template <class U, class V>
|
||||
struct B;
|
||||
|
||||
template <class U>
|
||||
struct B<U, typename enable_if_c<U::sub::value==0>::type>
|
||||
{ };
|
||||
};
|
||||
|
||||
struct C
|
||||
{
|
||||
struct sub
|
||||
{
|
||||
static const int value = 0;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
A<int> a;
|
||||
A<int>::B<C, void> b;
|
Loading…
Reference in New Issue
Block a user