c++ - 如何使 exuberant-ctags 解析 "using"样式的 typedef?

标签 c++ c++11 ctags exuberant-ctags

如何让 ctags 解析 using 类型别名,如下所示?

using FooPtr = std::shared_ptr<Foo>;

它只选取那些用 typedef 声明的。

最佳答案

从 Exuberant-ctags 派生的 Universal-ctags( https://ctags.io ) 在 C++ 源文件中处理“使用”:

[jet@localhost]/tmp% cat /tmp/foo.cpp 
using FooPtr = std::shared_ptr<Foo>;
[jet@localhost]/tmp% u-ctags -o - /tmp/foo.cpp
FooPtr  /tmp/foo.cpp    /^using FooPtr = std::shared_ptr<Foo>;$/;"  t   typeref:typename:std::shared_ptr<Foo>   file:

关于c++ - 如何使 exuberant-ctags 解析 "using"样式的 typedef?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50558984/

相关文章:

c++ - 似乎很难找出这个简单程序的时间复杂度

c++ - 获取指向 lambda 的函数指针?

c++ - 在容器之间 move 一系列元素?

c++ - 是否有用于右值引用的 reference_wrapper<>?

Vim:设置 ctag 很困难。子目录中的源代码在项目根目录中看不到标签文件

c++ - 通过 Gina 修改 Windows ctrl-alt-del 行为

c++ - vector 分配/插入和转换值分配/插入

c++ - 使用 C++ 的父类(super class)和子类中的继承给出错误

vim - 如何为 CoffeeScript 生成 ctags?

node.js - 从 npm : no such option --no-parallel 安装 ctags