I get the incorrect style warning "same expression on both sides of '||'" with this shortened code. Is this a known fault and is it difficult to fix?
template < typename T > void func(T a) { static_assert(std::is_same<T, char>::value || std::is_same<T, signed char>::value, "Coding mistake"); }
that might very well be in our issue tracker already. not sure.
I am not sure how hard it is to fix. Not sure where exactly the problem is off the top of my head. Is the AST correct here and so on.
However Cppcheck does not have to handle concepts 100%. I feel we can rely on the compiler.
I created this ticket so we don't loose this trouble report: https://trac.cppcheck.net/ticket/10474
Thanks for reporting this issue. If you want .. feel free to investigate.
Log in to post a comment.
I get the incorrect style warning "same expression on both sides of '||'" with this shortened code. Is this a known fault and is it difficult to fix?
Last edit: Fraser 2021-09-11
that might very well be in our issue tracker already. not sure.
I am not sure how hard it is to fix. Not sure where exactly the problem is off the top of my head. Is the AST correct here and so on.
However Cppcheck does not have to handle concepts 100%. I feel we can rely on the compiler.
I created this ticket so we don't loose this trouble report:
https://trac.cppcheck.net/ticket/10474
Thanks for reporting this issue. If you want .. feel free to investigate.