Hi there, I am trying to check a codebase and came across a syntax error when parsing a statement like this:
```cpp template < size_t I = 0, typename... ArgsT, std::enable_if_t<I<sizeof...(argst)>* = nullptr</sizeof...(argst)>
SizeType _variant_helper(size_t, std::variant<argst...>&);</argst...>
```
The big three compilers (Clang, MSVC and G++) called with settings for C++20, Wall and pedantic think this is perfectly fine.
CppCheck reports a syntax error.
Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/12789
Log in to post a comment.
Hi there,
I am trying to check a codebase and came across a syntax error when parsing a statement like this:
```cpp
template <
size_t I = 0, typename... ArgsT,
std::enable_if_t<I<sizeof...(argst)>* = nullptr</sizeof...(argst)>
```
The big three compilers (Clang, MSVC and G++) called with settings for C++20, Wall and pedantic think this is perfectly fine.
CppCheck reports a syntax error.
Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/12789