[cedet-semantic] No completion candidates for a template case
Brought to you by:
zappo
From: Liang W. <net...@gm...> - 2015-10-09 23:22:16
|
Hi, In the following c++ case, there is no completion candidates for local variable b in the main function. I'm new to semantic. Can someone tell me where I should start looking in the source code to debug this problem? template<typename T> struct isPodLike { static const bool value = false; }; template<> struct isPodLike<int> { static const bool value = true; }; template<typename T, bool isPod> class A { public: A(); void foo() {} }; template<typename T> class B : public A<T, isPodLike<T>::value> { // A<T, true> works public: void bar() {} }; int main(int argc, char *argv[]) { B<int> b; b. // no completion candidates return 0; } I tried M-x semantic-analyze-current-context and here is the first part of output. It seems that prefix types are not found for b. Context Type: #<semantic-analyze-context semantic-analyze-context> Bounds: (396 . 396) Prefix: B b "" Prefix Classes: 'function 'variable 'type Prefix Types: 'nil Encountered Errors: <none> Btw, the real case is LLVM's SmallVector. Thanks, Liang |