diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPTemplateResolutionTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPTemplateResolutionTest.java index de99ebd017e..35c75df3e5d 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPTemplateResolutionTest.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPTemplateResolutionTest.java @@ -86,8 +86,7 @@ public class IndexCPPTemplateResolutionTest extends IndexBindingResolutionTestBa } // template - // class Allocator { - // public: + // struct Allocator { // typedef _TpAllocator& alloc_reference; // template // struct rebind { @@ -96,8 +95,7 @@ public class IndexCPPTemplateResolutionTest extends IndexBindingResolutionTestBa // }; // // template > - // class Vec { - // public: + // struct Vec { // typedef typename _Alloc::template rebind<_Tp>::other::alloc_reference reference; // }; @@ -112,8 +110,7 @@ public class IndexCPPTemplateResolutionTest extends IndexBindingResolutionTestBa } // template - // class Allocator { - // public: + // struct Allocator { // typedef _TpAllocator& alloc_reference; // template // struct rebind { @@ -122,14 +119,12 @@ public class IndexCPPTemplateResolutionTest extends IndexBindingResolutionTestBa // }; // // template - // class VecBase { - // public: + // struct VecBase { // typedef typename _AllocBase::template rebind<_TpBase>::other _Tp_alloc_type; // }; // // template > - // class Vec : protected VecBase<_Tp, _Alloc> { - // public: + // struct Vec : public VecBase<_Tp, _Alloc> { // typedef typename VecBase<_Tp, _Alloc>::_Tp_alloc_type::alloc_reference reference; // }; @@ -147,8 +142,7 @@ public class IndexCPPTemplateResolutionTest extends IndexBindingResolutionTestBa // class Allocator; // // template<> - // class Allocator { - // public: + // struct Allocator { // template // struct rebind { // typedef Allocator<_TpRebind> other; @@ -156,8 +150,7 @@ public class IndexCPPTemplateResolutionTest extends IndexBindingResolutionTestBa // }; // // template - // class Allocator { - // public: + // struct Allocator { // typedef _TpAllocator& alloc_reference; // template // struct rebind { @@ -166,14 +159,12 @@ public class IndexCPPTemplateResolutionTest extends IndexBindingResolutionTestBa // }; // // template - // class VecBase { - // public: + // struct VecBase { // typedef typename _AllocBase::template rebind<_TpBase>::other _Tp_alloc_type; // }; // // template > - // class Vec : protected VecBase<_Tp, _Alloc> { - // public: + // struct Vec : public VecBase<_Tp, _Alloc> { // typedef typename VecBase<_Tp, _Alloc>::_Tp_alloc_type::alloc_reference reference; // }; @@ -187,6 +178,35 @@ public class IndexCPPTemplateResolutionTest extends IndexBindingResolutionTestBa assertEquals("int", ASTTypeUtil.getType(type)); } + // template + // struct Allocator { + // typedef _TpAllocator& alloc_reference; + // template + // struct rebind { + // typedef Allocator<_TpRebind> other; + // }; + // }; + // + // template + // struct VecBase { + // typedef typename _AllocBase::template rebind<_TpBase*>::other unreferenced; + // typedef typename _AllocBase::template rebind<_TpBase>::other _Tp_alloc_type; + // }; + // + // template > + // struct Vec : public VecBase<_Tp, _Alloc> { + // typedef typename VecBase<_Tp, _Alloc>::_Tp_alloc_type::alloc_reference reference; + // }; + + // void f(int s); + // + // void test(Vec::reference p) { + // f(p); + // } + public void _testRebindPattern_276610() throws Exception { + getBindingFromASTName("f(p)", 1, ICPPFunction.class); + } + // class Str1 { // public: // Str1(const char* s) {