On Fri, Jan 04, 2019 at 12:13:13PM +0000, Richard Sandiford wrote:
> > Can we avoid the gratuitous use of template here?  We were told that C++ 
> > would 
> > be used only when it makes things more straightforward and it's the 
> > contrary 
> > in this case, to wit the need for the ugly RECURSE macro in the middle.
> 
> I did it that way so that it would be easy to add things like
> zero_or_minus_onep without cut-&-pasting the whole structure.
IMHO we can make such a change only when it is needed.

> The way to do that in C would be to use a macro for the full
> function, but that's even uglier due to the extra backslashes.

Or just make the function static inline and pass the function pointers
to it as arguments?  If it is inlined, it will be the same, it could be
even always_inline if that is really needed.

        Jakub

Reply via email to