Menu

#138 Incorrect rendering of function declaration with default arguments

_
closed
nobody
None
1
2015-11-13
2015-11-04
No

A simple C++ function declaration like this:

void foo(int a, int b=0)

is rendered as

void foo(int a,
int b = )

in Natural Docs html output. By contrast,

void foo(int a, int b = 0)

is rendered as one would expect.

Results obtained using NaturalDocs 1.51 in Ubuntu 15.10.

Discussion

  • Greg Valure

    Greg Valure - 2015-11-10

    Open [ND Dir]\Modules\NaturalDocs\Builder\HTMLBase.pm

    Search for "$param->DefaultValue()"

    In the first instance of it, change "if ($param->DefaultValue())" to "if (defined $param->DefaultValue())"

    Run Natural Docs with -r once to apply the changes everywhere.

     
  • Greg Valure

    Greg Valure - 2015-11-13
    • status: open --> closed
     
  • Greg Valure

    Greg Valure - 2015-11-13

    Fix checked in. Don't know when the next release will be.

     

Log in to post a comment.