Merge pull request #331 from keyboardio/h/RESTRICT_ARGS_COUNT/c++11-fix

Fix RESTRICT_ARGS_COUNT with gcc 8.1+
pull/332/head
Jesse Vincent 7 years ago committed by GitHub
commit c68f40b8c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -81,8 +81,8 @@ int array[] = { A, B, RESTRICT_ARGS_COUNT(C, 3, B_MACRO, ##__VA_ARGS__) };
NUM_EXPECTED_ARGS, \ NUM_EXPECTED_ARGS, \
ORIGINAL_MACRO, \ ORIGINAL_MACRO, \
...) \ ...) \
( __NL__ \ ((struct { __NL__ \
[]{ /* Here we are in the body of a dummy lambda function. */ __NL__ \ /* Here we are in the body of a dummy lambda function. */ __NL__ \
/* []{} is, BTW, the shortest way to write a lambda. */ __NL__ \ /* []{} is, BTW, the shortest way to write a lambda. */ __NL__ \
/* It is only used to hold the static_assert that cannot be */ __NL__ \ /* It is only used to hold the static_assert that cannot be */ __NL__ \
/* defined directly in the keymap initializer list. By using the */ __NL__ \ /* defined directly in the keymap initializer list. By using the */ __NL__ \
@ -116,6 +116,6 @@ int array[] = { A, B, RESTRICT_ARGS_COUNT(C, 3, B_MACRO, ##__VA_ARGS__) };
VERBOSE_STATIC_ASSERT_FOOTER __NL__ \ VERBOSE_STATIC_ASSERT_FOOTER __NL__ \
); __NL__ \ ); __NL__ \
__NL__ \ __NL__ \
}, /* End of dummy lambda, the comma operator's A operand. */ __NL__ \ }){}, /* End of dummy lambda, the comma operator's A operand. */ __NL__ \
B /* The overall ASSERT_ARGS_COUNT evaluates to B. */ __NL__ \ B /* The overall ASSERT_ARGS_COUNT evaluates to B. */ __NL__ \
) )

Loading…
Cancel
Save