cppcheck/test/cli/proj-inline-suppress/template.cpp

13 lines
198 B
C++
Raw Normal View History

namespace {
template <typename T>
T f() { return T(); }
}
// cppcheck-suppress unusedFunction
int g(int i) {
if (i == 0)
return f<char>();
if (i == 1)
return f<short>();
return f<int>();
}