Hello, I got this error from cppcheck, who kindly asked me to report it: test.h:8:40: error: Analysis failed (variable without scope). If the code is valid then please report this failure. [internalError] template <typename T> A<T>::A(const T &x) : x(x) {} ^ test.cpp #include "test.h test.h template <typename T> class A { public: A(const T &x); T x; }; template <typename T> A<T>::A(const T &x) : x(x) {} Command: cppcheck test.cpp --no-check-headers
Hello, I got this error from cppcheck, who kindly asked me to report it: test.h:8:40: error: Analysis failed (variable without scope). If the code is valid then please report this failure. [internalError] template <typename t=""> A<t>::A(const T &x) : x(x) {}</t></typename> test.cpp #include "test.h test.h template <typename T> class A { public: A(const T &x); T x; }; template <typename T> A<T>::A(const T &x) : x(x) {} Command: cppcheck test.cpp --no-check-headers