User Activity

  • Modified a comment on discussion Development on cppcheck

    Consider the following 2 source files, defining a template class called test. File main.cpp namespace { template<typename T> class test { T m_i; public: newtest() : m_i(0) {} }; } test<int> n; File other.cpp namespace { template<typename T> class test { T m_i; T m_j; public: newtest() : m_i(0), m_j(0) {} }; } test<int> n; In this case, double definition issues should be prevented by using anonymous namespaces. However, when running this code through cppcheck (version 2.9) I get a ctuOneDefinitionRuleViolation....

  • Posted a comment on discussion Development on cppcheck

    Consider the following 2 source files, defining a template class called test. File main.cpp namespace { template<typename T> class test { T m_i; public: newtest() : m_i(0) {} }; } test<int> n; File other.cpp namespace { template<typename T> class test { T m_i; T m_j; public: newtest() : m_i(0), m_j(0) {} }; } test<int> n; In this case, double definition issues should be prevented by using anonymous namespaces. However, when running this code through cppcheck (version 2.9) I get a ctuOneDefinitionRuleViolation....

  • Posted a comment on discussion General Discussion on cppcheck

    Hi all, Using a very simple test application I noticed that Cppcheck seems to fail to check code after a macro has been used. More specifically, this seems to be an issue when there is no semicolon after the line refering to the macro. Assume I have some code that uses the USE_A_MACRO macro, defined in an external header called macrodef.h. This header is not part of the files being checked (assume it's in an external library). First of all, I would expect cppcheck to complain about a missing macro...

View All

Personal Data

Username:
mojoritty
Joined:
2018-12-21 15:56:46

Projects

  • No projects to display.

Personal Tools