mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-06 07:45:50 +02:00
Test cases for bugs 269926 and 271948.
This commit is contained in:
parent
0d0465f611
commit
3550a299d4
1 changed files with 30 additions and 0 deletions
|
@ -3968,4 +3968,34 @@ public class AST2TemplateTests extends AST2BaseTest {
|
||||||
final String code = getAboveComment();
|
final String code = getAboveComment();
|
||||||
parseAndCheckBindings(code, ParserLanguage.CPP);
|
parseAndCheckBindings(code, ParserLanguage.CPP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// template <int N>
|
||||||
|
// void S(int (&array)[N]);
|
||||||
|
//
|
||||||
|
// int a[1];
|
||||||
|
// void test() {
|
||||||
|
// S(a);
|
||||||
|
// }
|
||||||
|
public void _testFunctionTemplateWithArrayReferenceParameter_269926() throws Exception {
|
||||||
|
final String code = getAboveComment();
|
||||||
|
parseAndCheckBindings(code, ParserLanguage.CPP);
|
||||||
|
}
|
||||||
|
|
||||||
|
// template <typename T>
|
||||||
|
// struct A {};
|
||||||
|
//
|
||||||
|
// struct B {
|
||||||
|
// template <typename T>
|
||||||
|
// operator A<T>();
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// void f(A<int> p);
|
||||||
|
//
|
||||||
|
// void test(B p) {
|
||||||
|
// f(p);
|
||||||
|
// }
|
||||||
|
public void _testTemplateConversionOperator_271948() throws Exception {
|
||||||
|
final String code = getAboveComment();
|
||||||
|
parseAndCheckBindings(code, ParserLanguage.CPP);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue