diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2011-05-02 19:39:53 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2011-05-02 19:39:53 +0000 |
commit | 01af97d3b23bded2b2b21af19bbc6e4cce49e5b3 (patch) | |
tree | 64a10f4c4154739d4a8191d7e1b52ce497f4ebd6 /test/SemaTemplate/dependent-template-recover.cpp | |
parent | c3b054d250cdca485c71845089c316e10610ebad (diff) |
Diffstat (limited to 'test/SemaTemplate/dependent-template-recover.cpp')
-rw-r--r-- | test/SemaTemplate/dependent-template-recover.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/test/SemaTemplate/dependent-template-recover.cpp b/test/SemaTemplate/dependent-template-recover.cpp index e91ffb52539c0..3c01f6586b016 100644 --- a/test/SemaTemplate/dependent-template-recover.cpp +++ b/test/SemaTemplate/dependent-template-recover.cpp @@ -16,3 +16,45 @@ struct X { (*t).f2<0>(); // expected-error{{expected expression}} } }; + +namespace PR9401 { + // From GCC PR c++/45558 + template <typename S, typename T> + struct C + { + template <typename U> + struct B + { + template <typename W> + struct E + { + explicit E(const W &x) : w(x) {} + const W &w; + }; + }; + }; + + struct F; + template <typename X> + struct D + { + D() {} + }; + + const D<F> g; + template <typename S, typename T> + struct A + { + template <typename U> + struct B : C<S, T>::template B<U> + { + typedef typename C<S, T>::template B<U> V; + static const D<typename V::template E<D<F> > > a; + }; + }; + + template <typename S, typename T> + template <typename U> + const D<typename C<S, T>::template B<U>::template E<D<F> > > + A<S, T>::B<U>::a = typename C<S, T>::template B<U>::template E<D<F> >(g); +} |