I am absolutely no template expert, but I agree that this looks like a false positive.
g++ accepts the code without complaints. The debug output of Cppcheck looks a bit strange.
I will create a ticket for that.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Looks like a false positive on the return statement of the global function:
false_positive.cpp:18:12: error: Uninitialized variable: bar < 9 > [uninitvar]
return bar;
^
I am absolutely no template expert, but I agree that this looks like a false positive.
g++ accepts the code without complaints. The debug output of Cppcheck looks a bit strange.
I will create a ticket for that.
I have created a ticket: https://trac.cppcheck.net/ticket/9467
Thank you for your report!