Create embedded-5_0-branch branch for development on ARM embedded cores.
[official-gcc.git] / embedded-5_0-branch / gcc / testsuite / g++.dg / template / pr51385.C
blobe76995467ca68402765853e1b49959c7100c9ce1
1 // PR c++/51385
3 template <__SIZE_TYPE__ N> struct NTmpl;
4 template <typename T, typename U, typename V = NTmpl<sizeof(T *)> >
5 struct PtrConvs {
6    enum { bad = 1 };
7 };
9 template <typename Target, typename Source>
10 struct PtrConvs<Target, Source, NTmpl<sizeof (*(Target **)0 = (Source *)0)> >;
12 template<typename T> struct test { static const bool value = true; };
13 template<> struct test<short> { static const bool value = false; };
15 template <typename T>
16 struct FussyTemplate
18   int sa[test<T>::value ? 1 : -1];
21 struct B { };
23 typedef char chk[1];
24 typedef char chk[PtrConvs<FussyTemplate<short>, B>::bad];