C++: Add another test with a template function whose non-type template parameter is in tail position.

This commit is contained in:
Mathias Vorreiter Pedersen
2025-11-25 14:52:26 +00:00
parent 6bae58e29c
commit faa55f50e7
4 changed files with 38 additions and 18 deletions

View File

@@ -107,8 +107,14 @@ void test_callWithArgument() {
template<int N, typename T>
T callWithNonTypeTemplate(const T&);
template<typename T, int N>
T callWithNonTypeTemplate(const T&);
void test_callWithNonTypeTemplate() {
int x = ymlSource();
int y = callWithNonTypeTemplate<10, int>(x);
ymlSink(y); // $ ir
}
int y1 = callWithNonTypeTemplate<10, int>(x);
ymlSink(y1); // $ ir
int y2 = callWithNonTypeTemplate<int, 10>(x);
ymlSink(y2); // $ ir
}