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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.