如何让 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/