diff --git a/regression/cpp/Templates4/main.cpp b/regression/cpp/Templates4/main.cpp new file mode 100644 index 00000000000..0bb5a348e4b --- /dev/null +++ b/regression/cpp/Templates4/main.cpp @@ -0,0 +1,29 @@ +template +struct __remove_cvref_t +{ +}; + +template > +struct __inv_unwrap +{ +}; + +template +struct __or_; + +template +struct conditional +{ + typedef _Iftrue type; +}; + +template +struct __or_<_B1, _B2, _B3, _Bn...> + : public conditional<_B1::value, _B1, __or_<_B2, _B3, _Bn...>>::type +{ +}; + +int main(int argc, char *argv[]) +{ + int x = 10 >> 1; +} diff --git a/regression/cpp/Templates4/test.desc b/regression/cpp/Templates4/test.desc new file mode 100644 index 00000000000..a003b07b93c --- /dev/null +++ b/regression/cpp/Templates4/test.desc @@ -0,0 +1,8 @@ +CORE +main.cpp + +^EXIT=0$ +^SIGNAL=0$ +-- +^warning: ignoring +^CONVERSION ERROR$ diff --git a/src/cpp/parse.cpp b/src/cpp/parse.cpp index 910d91a5811..873d2ca4294 100644 --- a/src/cpp/parse.cpp +++ b/src/cpp/parse.cpp @@ -4017,8 +4017,8 @@ bool Parser::rTemplateArgs(irept &template_args) tk2.text='>'; lex.Replace(tk2); lex.Insert(tk2); + lex.get_token(); DATA_INVARIANT(lex.LookAhead(0) == '>', "should be >"); - DATA_INVARIANT(lex.LookAhead(1) == '>', "should be >"); return true; default: