Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ Domain: Error when parsing enum in template class scope #13129

Open
HeinischValentin opened this issue Nov 13, 2024 · 0 comments
Open

C++ Domain: Error when parsing enum in template class scope #13129

HeinischValentin opened this issue Nov 13, 2024 · 0 comments

Comments

@HeinischValentin
Copy link

HeinischValentin commented Nov 13, 2024

Describe the bug

I am trying to document an enum, that is part of a partially specialized template class.
However, I am getting this issue:

index.rst:6: WARNING: Invalid C++ declaration: Expected identifier in nested name, got keyword: template [error at 8]
  template<> Some<int>::Enum
  --------^

This only occurs for enums.
It works when I declare a class the same way.

How to Reproduce

.. This works:

.. cpp:class:: template<> Some<int>::Class


.. This doesn't:

.. cpp:enum:: template<> Some<int>::Enum

Environment Information

Platform:              linux; (Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.35)
Python version:        3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0])
Python implementation: CPython
Sphinx version:        8.1.3
Docutils version:      0.21.2
Jinja2 version:        3.1.4
Pygments version:      2.18.0

Sphinx extensions

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants