Skip to content

A bugfix for #1002#1141

Merged
gmaurel merged 3 commits intouncrustify:masterfrom
guy-maurel:LoseSpaceTemplate
May 11, 2017
Merged

A bugfix for #1002#1141
gmaurel merged 3 commits intouncrustify:masterfrom
guy-maurel:LoseSpaceTemplate

Conversation

@guy-maurel
Copy link
Copy Markdown
Contributor

Test if not in template

indent_columns = 4
sp_arith = force
sp_assign = force
sp_bool = force
Copy link
Copy Markdown
Collaborator

@CDanU CDanU May 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are all of those needed?
As far as I understand the problem, only sp_before_byref/sp_after_byref and sp_bool should be involved.
The option sp_bool should be activated while both of the other options should not.

@@ -0,0 +1,4 @@
template< class B1 = void, class B2 = void >
struct conjunction : bool_constant<B1::value1 && B2::value2>
Copy link
Copy Markdown
Collaborator

@CDanU CDanU May 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed this, you are not testing if sp_bool = force is actually doing anything here.
You could do this:

struct conjunction : bool_constant<B1::value1  &&  B2::value2>
struct conjunction : bool_constant<B1::value1&&B2::value2>

There should also be a test with remove. The other two mentioned options (sp_before_byref, sp_after_byref ) should also be included to make sure that they are not causing misbehavior.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@gmaurel gmaurel merged commit 7887c1a into uncrustify:master May 11, 2017
@guy-maurel guy-maurel deleted the LoseSpaceTemplate branch December 13, 2017 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants