1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 08:55:25 +02:00

Correct assignment of template declaration to names of constructor using template ids, bug 259600.

This commit is contained in:
Markus Schorn 2009-01-09 09:42:43 +00:00
parent cb8d71c528
commit aae52e7e68

View file

@ -3594,4 +3594,19 @@ public class AST2TemplateTests extends AST2BaseTest {
ICPPConstructor ctor= bh.assertNonProblem("DumbPtr<T>/**/", 10);
ICPPMethod dtor= bh.assertNonProblem("~DumbPtr<T>/**/", 11);
}
// template <class T> class XT {
// public:
// template<typename X> XT(X*);
// template<typename X> XT(X&);
// };
// template <class T> template <class X> XT<T>::XT/**/(X* a) {}
// template <class T> template <class X> XT<T>::XT<T>/**/(X& a) {}
public void testCtorTemplateWithTemplateID_259600() throws Exception {
final String code = getAboveComment();
parseAndCheckBindings(code, ParserLanguage.CPP);
BindingAssertionHelper bh= new BindingAssertionHelper(code, true);
ICPPConstructor ctor= bh.assertNonProblem("XT/**/", 2);
ctor= bh.assertNonProblem("XT<T>/**/", 5);
}
}