Skip to content

Commit

Permalink
reduce the number of mandatory parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
jwnhy committed Sep 10, 2024
1 parent 2c0ceb4 commit 9faf9da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/boost/wave/util/cpp_macromap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1489,13 +1489,15 @@ macromap<ContextT>::expand_macro(ContainerT &expanded,
#if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0
#if BOOST_WAVE_SUPPORT_GNU_NAMED_VARIADICS_PLACEMARKERS != 0
if (boost::wave::need_named_variadics(ctx.get_language())) {
// named variadics can be completely left out
if ((parm_count_required >= 2) &&
T_ELLIPSIS == token_id(*(macro_def.macroparameters.end() - 1)) &&
T_IDENTIFIER == token_id(*(macro_def.macroparameters.end() - 2)))
--parm_count_required;
parm_count_required -= 2;
}
#endif
#endif

#if BOOST_WAVE_SUPPORT_CPP2A
if (boost::wave::need_cpp2a(ctx.get_language())) {
// Starting with C++20, variable arguments may be left out
Expand Down

0 comments on commit 9faf9da

Please sign in to comment.