I have a piece of code which cppcheck warns me about, but I can't find out why.
If I declare "std::array<std::array<double,3>,3> array;" in a file, it warns: "warning: Found suspicious operator ',' [constStatement]", when I use the --enable=all option.</std::array<double,3>
I have reproduced this with just a cpp file with one function containing just this statement and one where I added the same statement with an initializer:
I have a piece of code which cppcheck warns me about, but I can't find out why.
If I declare "std::array<std::array<double,3>,3> array;" in a file, it warns: "warning: Found suspicious operator ',' [constStatement]", when I use the --enable=all option.</std::array<double,3>
I have reproduced this with just a cpp file with one function containing just this statement and one where I added the same statement with an initializer:
I am wondering whether this is a bug or if there is a real concern here. Thanks!
Last edit: haroim 2020-06-12
Thanks! No real concern, Cppcheck is wrong. I created this ticket:
https://trac.cppcheck.net/ticket/9766
Thanks for the quick reply!