どのプラットフォームの cscope のどのバージョンですか?
次のコードを使用します。
ああ
#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 */
MacOS Xでコンパイルされたcscope 15.7a(おそらく以前のバージョンでコンパイルされた10.6.4で実行)を使用して、次のことを行いました。
cscope -b -q a.*
cscope -d
次に、Testを検索して、次を参照してください。
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::Test
すると、次のエラーが返されます。
This is not a C symbol: A::Test
したがって、表面的には、cscope 15.7a にアップグレードする必要があります (またはダウングレードしますか?)。