[Bug c++/105436] [13 Regression] parse error with >= operator expression in template argument list in C++14 mode since r13-40
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Apr 29 19:57:04 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105436
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
The C++14 vs C++17 difference is due to:
/* It must be a non-type argument. In C++17 any constant-expression is
allowed. */
if (cxx_dialect > cxx14)
goto general_expr;
in cp_parser_template_argument. So in C++14 we get "N" as the targ but in
C++17 it is the whole "N >= 5" expression.
More information about the Gcc-bugs
mailing list