diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-11-04 15:04:32 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-11-04 15:04:32 +0000 |
commit | 51fb8b013e7734b795139f49d3b1f77c539be20a (patch) | |
tree | 59e0e47a9831dcf0e21e547927c8ebb7e113bfd1 /test/SemaTemplate/instantiate-declref.cpp | |
parent | 73490b890977362d28dd6326843a1ecae413921d (diff) |
Notes
Diffstat (limited to 'test/SemaTemplate/instantiate-declref.cpp')
-rw-r--r-- | test/SemaTemplate/instantiate-declref.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-declref.cpp b/test/SemaTemplate/instantiate-declref.cpp index 051c6050abea..359e2c7dfaa4 100644 --- a/test/SemaTemplate/instantiate-declref.cpp +++ b/test/SemaTemplate/instantiate-declref.cpp @@ -69,3 +69,21 @@ namespace N2 { template struct N2::Outer2::Inner<float>; template struct N2::Outer2::Inner<int*, float*>; // expected-note{{instantiation}} + +// Test dependent pointer-to-member expressions. +template<typename T> +struct smart_ptr { + struct safe_bool { + int member; + }; + + operator int safe_bool::*() const { + return ptr? &safe_bool::member : 0; + } + + T* ptr; +}; + +void test_smart_ptr(smart_ptr<int> p) { + if (p) { } +} |