in our project we use heavily generated code and therefore a lot of template classes. We have observed that we come across the limit of max template instantiations and analyzed that this is not totally true,
CppCheck is counting all instantiations of a template inside a template (i.e. the Inner<n> inside the example - without this the error doesn't happen) as recursive instantiations of that template.</n>
That is it doesn't differentiate between something like
instead counting both as "recursive" templates (although in the first case it is counting the "recursive" instantiations, in the later case it is counting Unrelated instantiations.
It would be helpful if cppcheck would improve as this would not lead for us to the limit and we can remove workarounds from our side.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
in our project we use heavily generated code and therefore a lot of template classes. We have observed that we come across the limit of max template instantiations and analyzed that this is not totally true,
CppCheck is counting all instantiations of a template inside a template (i.e. the Inner<n> inside the example - without this the error doesn't happen) as recursive instantiations of that template.</n>
That is it doesn't differentiate between something like
and
instead counting both as "recursive" templates (although in the first case it is counting the "recursive" instantiations, in the later case it is counting Unrelated instantiations.
It would be helpful if cppcheck would improve as this would not lead for us to the limit and we can remove workarounds from our side.
I don't get a warning for
Am I missing something?