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

Spurious "Error in type declaration" #408

Open
pitrou opened this issue Dec 11, 2018 · 4 comments
Open

Spurious "Error in type declaration" #408

pitrou opened this issue Dec 11, 2018 · 4 comments
Labels
bug Problem in existing code code Source code

Comments

@pitrou
Copy link

pitrou commented Dec 11, 2018

Given the following C++ declarations:

template <typename TypeClass>
class NumericArray;

class Date64Type;
using Date64Array = NumericArray<Date64Type>;

(note the Date64Type and NumericArray classes are documented in other headers)

and the following directives:

.. doxygenclass:: arrow::NumericArray
   :members:

.. doxygentypedef:: arrow::Date64Array

I get the following error:

/home/antoine/arrow/docs/source/cpp/api/array.rst:72:Error in type declaration.
If typedef-like declaration:
  Type must be either just a name or a typedef-like declaration.
  If just a name:
    Invalid definition: Expected end of definition. [error at 19]
      arrow::Date64Array = typedef NumericArray<Date64Type>
      -------------------^
  If typedef-like declaration:
    Error in declarator or parameters and qualifiers
    If pointer to member declarator:
      Invalid definition: Expected identifier in nested name. [error at 19]
        arrow::Date64Array = typedef NumericArray<Date64Type>
        -------------------^
    If declarator-id:
      Invalid definition: Expected identifier in nested name. [error at 19]
        arrow::Date64Array = typedef NumericArray<Date64Type>
        -------------------^
If type alias or template alias:
  Invalid definition: Expected identifier in nested name, got keyword: typedef [error at 28]
    arrow::Date64Array = typedef NumericArray<Date64Type>
    ----------------------------^
@jakobandersen
Copy link
Collaborator

That typedef should not be in the declaration string given to Sphinx. Perhaps the same issue as in #316?

@pitrou
Copy link
Author

pitrou commented Dec 11, 2018

Yes, it seems like this might by the same issue (though #316 is quite vague as to which warnings are emitted).

@vermeeren
Copy link
Collaborator

Fyi, I just closed #316, assuming it is resolved. As noted above it was a tad vague, this one is not. It is likely Breathe still mangles the declaration. Leaving this open.

@vermeeren
Copy link
Collaborator

This might be fixed with #512, released in Breathe v4.17.0. Note that you also need Sphinx 3.x for recent Breathe versions. Could someone try and post results?

@vermeeren vermeeren added bug Problem in existing code code Source code labels May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Problem in existing code code Source code
Projects
None yet
Development

No branches or pull requests

3 participants