My problem is that imenu or speedbar/semantic fails because of indentation. For this simple file, it is ok:
#include <iostream>
void bar() {
std::cout << "bar" << std::endl;
}
But if I want to put function bar in a namespace and indent its code:
with speedbar (having
(require 'semantic/sb)
in init.el), I don't have the file tags in the speedbar frame, and I got "File mode specification error: (void-function c-subword-mode)" in minibufferwith M-X imenu, I got "No items suitable for an index found in this buffer" in minibuffer
Exemple code that fails:
#include <iostream>
namespace foo {
void bar() {
std::cout << "bar" << std::endl;
}
}
It is not the namespace that makes it fail, but the identation. The following fails too:
#include <iostream>
void bar() {
std::cout << "bar" << std::endl;
}
Any idea why and how to have it to work?
Thanks!!
EDIT: Ok the solution is indeed speedbar+sementics. It actually works (I had something wrong in my init.el...)