I started trying to fix issue #1013, but found it rather difficult to change the current parser. This pull-request is therefore a rewrite of most of the C++ domain such that the parser follows the overall structure of the C++ grammar. This should make it easier to add new features.
Most notable changes:
Hyperlinks to all found nested names and template arguments (also fixes #1103).
Support for function types everywhere, e.g., in std::function<bool(int, int)> (#1013).
Support for virtual functions.
Changed interpretation of function arguments to following standard prototype declarations, i.e., void f(arg) means that arg is the type of the argument, instead of it being the name.
Updated tests.
Updated documentation with elaborate description of what declarations are supported and how the namespace declarations influence declaration and cross-reference lookup.
Index names may be different now. Elements are indexed by their fully qualified name. It should be rather easy to change this behaviour and potentially index by namespaces/classes as well.
Thanks for the PR! I'll take a look ASAP!
@Jakob Lykke Andersen this change causes test failures : https://drone.io/bitbucket.org/shimizukawa/sphinx-rewrite-cpp-domain/1 Please fix the problem.
Ups (though I had run the tests), it should work now.
Thanks! but.. https://drone.io/bitbucket.org/shimizukawa/sphinx-rewrite-cpp-domain/2 I hate to bother you, but can you correct it? ;)
No problem :-), it should (really) work now.
Thanks!!
fix and refactored at 4d89d0906ae1