C++, fix refs to operator() functions.

Fixes sphinx-doc/sphinx#2952.
This commit is contained in:
Jakob Lykke Andersen
2017-01-15 14:36:29 +09:00
parent 00fcbfb35d
commit ccd6bf4a0c
6 changed files with 49 additions and 11 deletions

View File

@@ -11,3 +11,7 @@ any role
* ref function with parens :cpp:any:`paren_2()`
* ref function without parens, explicit title :cpp:any:`paren_3_title <paren_3>`
* ref function with parens, explicit title :cpp:any:`paren_4_title <paren_4()>`
* ref op call without parens :cpp:any:`paren_5::operator()`
* ref op call with parens :cpp:any:`paren_6::operator()()`
* ref op call without parens, explicit title :cpp:any:`paren_7_title <paren_7::operator()>`
* ref op call with parens, explicit title :cpp:any:`paren_8_title <paren_8::operator()()>`

View File

@@ -38,9 +38,10 @@ directives
.. cpp:function:: void paren_1(int, float)
.. cpp:function:: void paren_2(int, float)
.. cpp:function:: void paren_3(int, float)
.. cpp:function:: void paren_4(int, float)
.. cpp:function:: void paren_5::operator()(int)
.. cpp:function:: void paren_6::operator()(int)
.. cpp:function:: void paren_7::operator()(int)
.. cpp:function:: void paren_8::operator()(int)

View File

@@ -11,3 +11,7 @@ roles
* ref function with parens :cpp:func:`paren_2()`
* ref function without parens, explicit title :cpp:func:`paren_3_title <paren_3>`
* ref function with parens, explicit title :cpp:func:`paren_4_title <paren_4()>`
* ref op call without parens :cpp:func:`paren_5::operator()`
* ref op call with parens :cpp:func:`paren_6::operator()()`
* ref op call without parens, explicit title :cpp:func:`paren_7_title <paren_7::operator()>`
* ref op call with parens, explicit title :cpp:func:`paren_8_title <paren_8::operator()()>`

View File

@@ -524,7 +524,11 @@ def test_build_domain_cpp_with_add_function_parentheses_is_True(app, status, war
('ref function without parens ', 'paren_1\(\)'),
('ref function with parens ', 'paren_2\(\)'),
('ref function without parens, explicit title ', 'paren_3_title'),
('ref function with parens, explicit title ', 'paren_4_title')
('ref function with parens, explicit title ', 'paren_4_title'),
('ref op call without parens ', 'paren_5::operator\(\)\(\)'),
('ref op call with parens ', 'paren_6::operator\(\)\(\)'),
('ref op call without parens, explicit title ', 'paren_7_title'),
('ref op call with parens, explicit title ', 'paren_8_title')
]
f = 'roles.html'
@@ -562,7 +566,11 @@ def test_build_domain_cpp_with_add_function_parentheses_is_False(app, status, wa
('ref function without parens ', 'paren_1'),
('ref function with parens ', 'paren_2'),
('ref function without parens, explicit title ', 'paren_3_title'),
('ref function with parens, explicit title ', 'paren_4_title')
('ref function with parens, explicit title ', 'paren_4_title'),
('ref op call without parens ', 'paren_5::operator\(\)'),
('ref op call with parens ', 'paren_6::operator\(\)'),
('ref op call without parens, explicit title ', 'paren_7_title'),
('ref op call with parens, explicit title ', 'paren_8_title')
]
f = 'roles.html'