mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #2178: Unparseable C++ cross-reference when referencing a function with :cpp:any:
This commit is contained in:
10
tests/roots/test-domain-cpp/any-role.rst
Normal file
10
tests/roots/test-domain-cpp/any-role.rst
Normal 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`
|
||||
4
tests/roots/test-domain-cpp/conf.py
Normal file
4
tests/roots/test-domain-cpp/conf.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
master_doc = 'index'
|
||||
html_theme = 'classic'
|
||||
37
tests/roots/test-domain-cpp/index.rst
Normal file
37
tests/roots/test-domain-cpp/index.rst
Normal 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.
|
||||
10
tests/roots/test-domain-cpp/roles.rst
Normal file
10
tests/roots/test-domain-cpp/roles.rst
Normal 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`
|
||||
Reference in New Issue
Block a user