Fix #2178: Unparseable C++ cross-reference when referencing a function with :cpp:any:

This commit is contained in:
Takeshi KOMIYA
2015-12-27 16:29:07 +09:00
parent 87998df9cb
commit 07cc02a512
7 changed files with 123 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
any role
--------
* :cpp:any:`Sphinx`
* ref function without parens :cpp:any:`hello`.
* ref function with parens :cpp:any:`hello()`.
* :cpp:any:`Sphinx::version`
* :cpp:any:`version`
* :cpp:any:`List`
* :cpp:any:`MyEnum`

View File

@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
master_doc = 'index'
html_theme = 'classic'

View File

@@ -0,0 +1,37 @@
test-domain-cpp
===============
directives
----------
.. cpp:class:: public Sphinx
The description of Sphinx class.
.. cpp:function:: int hello(char *name)
The description of hello function.
.. cpp:member:: float Sphinx::version
The description of Sphinx::version.
.. cpp:var:: int version
The description of version.
.. cpp:type:: std::vector<int> List
The description of List type.
.. cpp:enum:: MyEnum
An unscoped enum.
.. cpp:enum-class:: MyScopedEnum
A scoped enum.
.. cpp:enum-struct:: protected MyScopedVisibilityEnum : std::underlying_type<MySpecificEnum>::type
A scoped enum with non-default visibility, and with a specified underlying type.

View File

@@ -0,0 +1,10 @@
roles
-----
* :cpp:class:`Sphinx`
* ref function without parens :cpp:func:`hello`.
* ref function with parens :cpp:func:`hello()`.
* :cpp:member:`Sphinx::version`
* :cpp:var:`version`
* :cpp:type:`List`
* :cpp:enum:`MyEnum`