The following code generates a false positive [noExplicitConstructor] style warning:
[noExplicitConstructor]
template<typename T> using SomeFunctionPointer = void (*)(const T *foo); template<typename T> class ExampleBaseClass { public: ExampleBaseClass(const SomeFunctionPointer<T> function, const int number) : m_function(function), m_number(number) { } private: SomeFunctionPointer<T> m_function; int m_number; }; class ExampleClass : public ExampleBaseClass<int> { public: ExampleClass() : ExampleBaseClass(ExampleClass::exampleFunction, 42) { } static void exampleFunction(const int *foo) { (void) foo; } };
Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/11314
Log in to post a comment.
The following code generates a false positive
[noExplicitConstructor]
style warning:Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/11314