1

Is there a package that can tell me the arguments for c++ constructor?

class T1 {
    public:
        T1(int x, int y);
};

T1::T1(int x, int y) {
    std::cout << x+y << std::endl;
}

int main() {
    T1 h1(5, 5);
    return 0;
}

For example when I write T1 h1( it informs me the constructor takes int x and int y.

JeanPierre
  • 7,323
  • 1
  • 18
  • 37
bon
  • 13
  • 3

1 Answers1

0

There's rtags. An introduction is available at Vx Labs, Step-by-step guide to C++ navigation and completion with Emacs and the Clang-based rtags. The introduction presents an rtags installation via the ELPA packaging system, noting a dependency on the Debian/Ubuntu libclang 'dev package (e.g libclang-3.6-dev in Ubuntu 14.04) and also mentions the support for company-mode in rtags.

Some more information about company-mode, elsewhere at the Emacs Stack Exchange: How can I get C/C++ context-sensitive completion with Company?

Alternately, of course there's cscope and similar - at the Emacs Wiki, some information/advice, CScopeAndEmacs

Sean Champ
  • 60
  • 5