2

I have the following function:

template<typename Gender, typename Age> bool checkSomething( param1, param2, param3)
{...}

when I put the following function call through Uncrustify:

if( somethingChanged == checkSomething<Female, OverThirty>( param1, param2, param3)) 
{...}

it changes it to

if( somethingChanged == checkSomething<Female) , OverThirty>( param1, param2, param3)) 
{...}

Notice the extra closed parenthesis after Female

This obviously breaks my code. I would appreciate any ideas about how to turn it off.

Bot
  • 11,868
  • 11
  • 75
  • 131
Oksana K
  • 155
  • 2
  • 9
  • 1
    ?perhaps the [Yoda Condition](http://www.codinghorror.com/blog/2012/07/new-programming-jargon.html) confusing is – Bo Persson Oct 26 '12 at 18:11
  • It appears to be puking on the template-param-list specifier. I.e. It thinks `checkSomething – WhozCraig Oct 26 '12 at 18:23
  • Changes nothing the yoda condition. I've already tried. PS: However, the parentheses switched sides! That's definitely a clue. Thank you, Bo – Oksana K Oct 26 '12 at 18:38
  • The problem with "don't use it" is that it all throughout the code, and is actually very useful and easy to read, write and understand (when you see it in its entirety. – Oksana K Oct 26 '12 at 18:39
  • @BoPersson, changing the yoda condition, changed the parenthesis side which indicated that it's a condition connected to if statement parenthesis. mod_full_paren_if_bool = false solved my problem. Thanks again – Oksana K Oct 26 '12 at 18:46

0 Answers0