Skip to content

Commit b38abd4

Browse files
Update testsimplifytemplate.cpp
1 parent 9d45d1a commit b38abd4

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

test/testsimplifytemplate.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6390,6 +6390,18 @@ class TestSimplifyTemplate : public TestFixture {
63906390
"A<int,S> a ; "
63916391
"struct A<int,S> { } ;";
63926392
ASSERT_EQUALS(expected2, tok(code2));
6393+
6394+
const char code3[] = "template <int... N>\n" // #14477
6395+
" int f() {\n"
6396+
" return (0 | ... | (1, 2, 4));\n"
6397+
"}\n"
6398+
"int main() {\n"
6399+
" return f<1, 2, 4>();\n"
6400+
"}\n";
6401+
const char expected3[] = "int f<1,2,4> ( ) ; "
6402+
"int main ( ) { return f<1,2,4> ( ) ; } "
6403+
"int f<1,2,4> ( ) { return ( 0 | ... | ( 1 , 2 , 4 ) ) ; }";
6404+
ASSERT_EQUALS(expected3, tok(code3));
63936405
}
63946406

63956407
void template_variable_1() {

0 commit comments

Comments
 (0)