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

"Invalid C++ declaration" with C++ lambda expression #10152

Open
pitrou opened this issue Jan 31, 2022 · 1 comment
Open

"Invalid C++ declaration" with C++ lambda expression #10152

pitrou opened this issue Jan 31, 2022 · 1 comment
Labels
domains:cpp type:enhancement enhance or introduce a new feature

Comments

@pitrou
Copy link

pitrou commented Jan 31, 2022

Describe the bug

When building the Apache Arrow docs, we get the following warning:

/home/antoine/arrow/dev/docs/source/cpp/api/dataset.rst:62: WARNING: Parsing of expression failed. Using fallback parser. Error was:
Error in postfix expression, expected primary expression or type.
If primary expression:
  Invalid C++ declaration: Expected identifier in nested name. [error at 59]
    std::function< Status(FileWriter *)> writer_pre_finish   = [](FileWriter*) {returnStatus::OK();}
    -----------------------------------------------------------^
If type:
  Invalid C++ declaration: Expected identifier in nested name. [error at 59]
    std::function< Status(FileWriter *)> writer_pre_finish   = [](FileWriter*) {returnStatus::OK();}
    -----------------------------------------------------------^

How to Reproduce

The build procedure is a bit too complex to reproduce here. But I don't think that matters since the context is clear from the warning message above.

Expected behavior

Ideally there's a way to silence the warning. I understand that parsing C++ is hard, so I'm not necessarily expecting Sphinx to get it right in all cases :-) But the warning is distracting.

Your project

https://arrow.apache.org/

Screenshots

No response

OS

Ubuntu 20.04

Python version

3.9.7

Sphinx version

4.3.2

Sphinx extensions

breathe 4.31.0

Extra tools

doxygen 1.9.2

Additional context

No response

@drewrisinger
Copy link
Contributor

Bump. Ran into this error today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domains:cpp type:enhancement enhance or introduce a new feature
Projects
None yet
Development

No branches or pull requests

4 participants