Which version of cscope on which platform?
With the code as shown:
a.h
#ifndef A_H_INCLUDED
#define A_H_INCLUDED
template <class T> A
{
void Test(T a);
};
#include "a.hpp"
#endif /* A_H_INCLUDED */
a.hpp
#ifndef A_HPP_INCLUDED
#define A_HPP_INCLUDED
template <class T> A::Test(T a) { return !!a; }
#endif /* A_HPP_INCLUDED */
and using cscope 15.7a compiled on MacOS X (running on 10.6.4, probably compiled on an earlier version), I did:
cscope -b -q a.*
cscope -d
and then searched for Test and see:
C symbol: Test
File Function Line
0 a.h <global> 5 void Test(T a);
1 a.hpp Test 3 template <class T> A::Test(T a) { return !!a; }
A search for A::Test
comes back with the error:
This is not a C symbol: A::Test
So, superficially, you need to upgrade to cscope 15.7a (or downgrade to it?).