The following code:
#include <map> struct test { enum key { a,b }; explicit test(key k) {} }; auto create_tests() { return std::map<int, test> { {1, test{test::a}} , {2, test{test::b}} }; }
causes this error:
cppcheck_test.cpp:11:29: error: Internal error. Token::astOperand2() cyclic dependency. [cppcheckError] return std::map<int, test>{
I do not have a trac account (I think), so I post it here. depending on my spare time, I will try to fix it myself.
The code is over simplified, but basically the enum is passed in so it's members are initialized accordingly to the enum.
Thanks! For some reason, I fail to reproduce.
Log in to post a comment.
The following code:
causes this error:
I do not have a trac account (I think), so I post it here.
depending on my spare time, I will try to fix it myself.
The code is over simplified, but basically the enum is passed in so it's members are initialized accordingly to the enum.
Thanks! For some reason, I fail to reproduce.