Search code examples
c++c++11ctagsexuberant-ctags

How to make exuberant-ctags parse "using" style typedefs?


How can I make ctags parse using type aliases, like the one below?

using FooPtr = std::shared_ptr<Foo>;

It only picks up ones declared with typedef.


Solution

  • Universal-ctags(https://ctags.io) forked from Exuberant-ctags handles 'using' in c++ source file:

    [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: