aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/instantiate-expr-2.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-08-31 20:00:26 +0000
committerDouglas Gregor <dgregor@apple.com>2009-08-31 20:00:26 +0000
commit017dde547d359a66ec38b80a098a5ddbef087048 (patch)
treed891ee8c3547aa6a70966cf06d3919a71feed122 /test/SemaTemplate/instantiate-expr-2.cpp
parenta6f0f9d589a06737707fe914e06bd6d4bfae0997 (diff)
Implement template instantiation for member operator access.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80609 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/instantiate-expr-2.cpp')
-rw-r--r--test/SemaTemplate/instantiate-expr-2.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-expr-2.cpp b/test/SemaTemplate/instantiate-expr-2.cpp
index 80f403ed56..2c3ccb06e4 100644
--- a/test/SemaTemplate/instantiate-expr-2.cpp
+++ b/test/SemaTemplate/instantiate-expr-2.cpp
@@ -130,3 +130,19 @@ struct X0 {
void test_X0(X0<int> x, IntegralConstant<int, sizeof(int)> ic) {
x.f(5,ic);
}
+
+namespace N8 {
+ struct X {
+ X operator+(const X&) const;
+ };
+
+ template<typename T>
+ T test_plus(const T* xp, const T& x, const T& y) {
+ x.operator+(y);
+ return xp->operator+(y);
+ }
+
+ void test_test_plus(X x) {
+ test_plus(&x, x, x);
+ }
+}