sphinx-doc / sphinx-doc/sphinx
C++, cpp:var item rejected in in cpp:function
Open
@jakobandersen is already working on this.
Since Mar 13, 2019.
domains:cpp
type:bug
- Dominant language
- Python
- Stars
- 8k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
ping @jakobandersen
I've been using cpp:var items inside cpp:function items to help document behaviours etc., and this is now being rejected. For instance:
.. cpp:function:: template<typename It> void foo(It start, It stop)
.. cpp:var:: auto const length = std::distance(start, stop)
The notional distance between the two iterators.
:complexity: :math:`\Theta(length)`
This used to be accepted, with references in cpp:expr or cpp:texpr linking to the appropriate places and such. This now results in something like:
WARNING: C++ declarations inside functions are not supported. Parent function is foo()
This looks to be related to the #5191 fix.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.