diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-12-15 18:49:47 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-12-15 18:49:47 +0000 |
commit | 34d02d0b37f16015f317a935c48ce8b7b64ae77b (patch) | |
tree | 2fd5819f49caecc5f520219b6b9254fe94ebb138 /test/SemaTemplate/instantiate-static-var.cpp | |
parent | 1569ce68681d909594d64f9b056d71f5dd7563bf (diff) |
Notes
Diffstat (limited to 'test/SemaTemplate/instantiate-static-var.cpp')
-rw-r--r-- | test/SemaTemplate/instantiate-static-var.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-static-var.cpp b/test/SemaTemplate/instantiate-static-var.cpp index 452fccf2244d..d4a7008b47bf 100644 --- a/test/SemaTemplate/instantiate-static-var.cpp +++ b/test/SemaTemplate/instantiate-static-var.cpp @@ -72,3 +72,23 @@ void Test() { Z1<Y2<X2>::value> x2; int y2[Y2<X2>::value]; } + +// PR5672 +template <int n> +struct X3 {}; + +class Y3 { + public: + ~Y3(); // The error isn't triggered without this dtor. + + void Foo(X3<1>); +}; + +template <typename T> +struct SizeOf { + static const int value = sizeof(T); +}; + +void MyTest3() { + Y3().Foo(X3<SizeOf<char>::value>()); +} |