Skip to content

Draft: Require a first `mask_arg_t` argument on prepared functor calls with masks

Gerhard Raven requested to merge prepared-functor-mask-handling into master

There was a difference between 'plain' and 'prepared' functors when they needed to be invoked with a mask: 'prepared' functors always required as first argument a mask (even if the other arguments did not have a need for a mask), whereas 'plain' functors required a mask_arg_t as first argument to flag that the second argument is actually a mask.

This divergence makes it impossible to skip the prepare step altogether for functors that (otherwise) do not need one (i.e. the fast majority of functors!), as the prepare step (also) adapts for this difference in calling convention. By unifying the convention, it will be possible to have a trivial 'prepare' step for those functors that do not need it, and instead return (acref to) the underlying functor directly, instead wrapping it in a lambda (and thus reduce the compile time complexity). Also, it will be possible to invoke 'prepared' functors without mask if (and only if!) no mask is needed. The latter two steps remain to be implemented, hence this MR is 'draft' for now.

Edited by Gerhard Raven

Merge request reports

Loading