breathe
breathe copied to clipboard
Spurious "Error in type declaration"
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>
----------------------------^
That typedef
should not be in the declaration string given to Sphinx. Perhaps the same issue as in #316?
Yes, it seems like this might by the same issue (though #316 is quite vague as to which warnings are emitted).
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.
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?