the same type in a function body (n::S<decltype(Ts())...> s;) or in an alias template
(using A = n::S<decltype(Ts())...>;).
Impact: the syntax error ends the analysis of every translation unit that includes the header,
so the project has to switch cppcheck off. It is the std::void_t idiom for SFINAE, typename = internal::Void<decltype(T{internal::DeclVal<Ts>()})...>>, in C++11 code.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Version: Cppcheck 2.19.0 and 2.22.0 (built from the 2.22.0 tag), Ubuntu 26.04.
Code (GCC and Clang compile it with -std=c++11, including an instantiation
f<int>()):No error when any one of these changes:
> >instead of>>at the end;S<...>unqualified instead ofn::S<...>;n::S<Ts...>withoutdecltype;n::S<decltype(Ts())...> s;) or in an alias template(
using A = n::S<decltype(Ts())...>;).Impact: the syntax error ends the analysis of every translation unit that includes the header,
so the project has to switch cppcheck off. It is the
std::void_tidiom for SFINAE,typename = internal::Void<decltype(T{internal::DeclVal<Ts>()})...>>, in C++11 code.Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/15192