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

Remove spurious "typedef" in type declaration when using "using" #424

Merged
merged 1 commit into from
Mar 15, 2019

Commits on Mar 15, 2019

  1. Remove spurious "typedef" in type declaration when using "using"

    Remove the spurious "typedef " on right hand side added
    by Doxygen observed when type is declared inside a namespace
    See examples/specific/using_in_ns
    
    ```cpp
    //
    // When declaring a type using a "using" directive inside a namespace,
    // Doxygen adds a spurious "typedef" in the corresponding XML definition
    //
    // $ doxygen --version
    // 1.8.11
    //
    
    namespace foo {
    using foo_int = int; // <definition>using foo::foo_int = typedef int</definition>
    }
    
    using global_int = int; // <definition>using global_int =  int</definition>
    ```
    
    It fixes warnings issued by Sphinx when processing the docstring:
    ```
    /path/to/using_in_ns.rst:10: WARNING: 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]
          foo::foo_int = typedef int
    ```
    
    * The extra "typedef" has been observed in XML written by Doxygen 1.8.11
    * The warning above has been observed with Sphinx 1.8.5
    Tristan Carel committed Mar 15, 2019
    Configuration menu
    Copy the full SHA
    cc037a2 View commit details
    Browse the repository at this point in the history