summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/dependent-expr.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-01-23 11:10:26 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-01-23 11:10:26 +0000
commit5044f5c816adfd5cba17f1adee1a10127296d0bf (patch)
treec69d3f4f13d508570bb5257a6aea735f88bdf09c /test/SemaTemplate/dependent-expr.cpp
parentee791dde723a2089c681d2ab6a9d4f96379d5f49 (diff)
Notes
Diffstat (limited to 'test/SemaTemplate/dependent-expr.cpp')
-rw-r--r--test/SemaTemplate/dependent-expr.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/SemaTemplate/dependent-expr.cpp b/test/SemaTemplate/dependent-expr.cpp
index 412a811f7292..3f481b513691 100644
--- a/test/SemaTemplate/dependent-expr.cpp
+++ b/test/SemaTemplate/dependent-expr.cpp
@@ -5,3 +5,22 @@ template <typename Iterator>
void Test(Iterator it) {
*(it += 1);
}
+
+namespace PR6045 {
+ template<unsigned int r>
+ class A
+ {
+ static const unsigned int member = r;
+ void f();
+ };
+
+ template<unsigned int r>
+ const unsigned int A<r>::member;
+
+ template<unsigned int r>
+ void A<r>::f()
+ {
+ unsigned k;
+ (void)(k % member);
+ }
+}