Fwd: Semanticdb and code completion for std::share_ptr<obj>
"tenspd137 ." <[email protected]> Wed, 16 Dec 2015 00:27:11 -0700
| Newsgroups | gmane.emacs.cedet |
|---|---|
| Message-ID | <CAB=m8w+to0i5ku+oSA0vTf+cg5oeUgoNKyMeomQiio_bL5pepA@mail.gmail.com> |
Hi all, I am forwarding this as asked in Alex Ott's Introduction to cedet. I hope someone can help me - thanks! ---------- Forwarded message ---------- From: tenspd137 . <[email protected]> Date: Tue, Dec 15, 2015 at 5:07 PM Subject: Semanticdb and code completion for std::share_ptr<obj> To: "[email protected]" <[email protected]> Hi all, Hopefully this is the right place for this..... I have been writing some code that uses std::shared_ptr. When ever I have lines like: std::shared_ptr<obj> ptr; ptr = std::shared_ptr<obj>(new obj()) ptr-> /C-c? or /C-c>, it says it can't find types for ptr but obj* ptr; ptr = new obj(); ptr-> will code complete. following is my CEDET setup: ;; CEDET ;; use external CEDET because bundled currently excludes ;; cedet-m3-minor-mode (setq cedet-root-path (file-name-as-directory "~/projects/cedet/")) (load-file (concat cedet-root-path "cedet-devel-load.el")) (add-to-list 'load-path (concat cedet-root-path "contrib")) (require 'cc-mode) (require 'semantic) (require 'eassist) (require 'semantic/ia) (require 'semantic/bovine/gcc) ;; submodes to enable (add-to-list 'semantic-default-submodes 'global-semantic-mru-bookmark-mode) (add-to-list 'semantic-default-submodes 'global-semanticdb-minor-mode) (add-to-list 'semantic-default-submodes 'global-semantic-idle-scheduler-mode) (add-to-list 'semantic-default-submodes 'global-cedet-m3-minor-mode) (add-to-list 'semantic-default-submodes 'global-semantic-stickyfunc-mode) (add-to-list 'semantic-default-submodes 'global-semantic-highlight-func-mode) (add-to-list 'semantic-default-submodes 'global-semanticdb-minor-mode) ;; activate semantic (semantic-mode 1) ;;function args (require 'function-args) (fa-config-default) (define-key c-mode-map [(control tab)] 'moo-complete) (define-key c++-mode-map [(control tab)] 'moo-complete) (define-key c-mode-map (kbd "M-o") 'fa-show) (define-key c++-mode-map (kbd "M-o") 'fa-show) ;; mode customization (defun dayd/cedet-hook() (local-set-key [(control return)] 'semantic-ia-complete-symbol-menu) (local-set-key "\C-c?" 'semantic-ia-complete-symbol) ;; (local-set-key "\C-c>" 'semantic-complete-analyze-inline) (local-set-key "\C-c=" 'semantic-decoration-include-visit) (local-set-key "\C-cj" 'semantic-ia-fast-jump) (local-set-key "\C-cq" 'semantic-ia-show-doc) (local-set-key "\C-cs" 'semantic-ia-show-summary) (local-set-key "\C-cp" 'semantic-analyze-proto-impl-toggle) ) (add-hook 'c-mode-common-hook 'dayd/cedet-hook) (add-hook 'lisp-mode-hook 'dayd/cedet-hook) (add-hook 'emacs-lisp-mode-hook 'dayd/cedet-hook) (defun dayd/c-mode-cedet-hook () (local-set-key "\C-ct" 'eassist-switch-h-cpp) (local-set-key "\C-xt" 'eassist-switch-h-cpp) (local-set-key "\C-ce" 'eassist-list-methods) (local-set-key "\C-c\C-r" 'semantic-symref) ) (add-hook 'c-mode-common-hook 'dayd/c-mode-cedet-hook) (semanticdb-enable-gnu-global-databases 'c-mode t) (semanticdb-enable-gnu-global-databases 'c++-mode t) (when (cedet-ectag-version-check t) (semantic-load-enable-primary-ectags-support)) ;; SRecode (global-srecode-minor-mode 1) ;; EDE (global-ede-mode 1) (ede-enable-generic-projects) ;; if you want to enable support for gnu global (when (cedet-gnu-global-version-check t) (semanticdb-enable-gnu-global-databases 'c-mode) (semanticdb-enable-gnu-global-databases 'c++-mode) and my version info is: CEDET Version: 2.0 Requested File Loaded Package Version Version Version ---------------------------------------------------------- cedet: 2.0 ok ok eieio: 1.4 ok ok semantic: 2.2 ok ok srecode: 1.2 ok ok ede: 1.2 2.0 2.0 cogre: 1.2 ok ok cedet-contrib: 1.2 ok Not Loaded C-h f cedet-version RET for details on output format. Am I missing something? Or does completions on std::shred_ptr not work? I have been Googling for an answer, but either can't find anything relevant or haven't hit the right search terms. Thanks! -C ------------------------------------------------------------------------------