[PATCH] D24882: Add StringSwitch::Cases functions that takes 6, 7 or 8 arguments.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 3 13:55:42 PDT 2017


On Sat, Sep 2, 2017 at 9:00 PM Davide Italiano via Phabricator <
reviews at reviews.llvm.org> wrote:

> davide added subscribers: dblaikie, davide.
> davide added a comment.
>
> I ended up in a situation where I needed 11 arguments (if you want a
> similar example, just grep for `StringSwitch<bool>` in MC).
> I think the proposed solution was OK'ish up to 10 arguments, but adding
> more might be not ideal. So, now that we live in a post C++98 world, what
> do you think about switching this class to use variadic templating? I'm
> going to implement such a solution if nobody has objections. (cc: @dblaikie
> for thoughts)
>

Yep, don't see any reason not to solve this in general with variadic
templates (maybe there are hiccups/difficulties I'm not seeing, of course).


>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D24882
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170903/4791c1a7/attachment.html>


More information about the llvm-commits mailing list