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

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 5 17:25:52 PDT 2017


Oh yea, I forgot about that issue.

I know it is possible to have a parameter pack not be the last argument, so
maybe it would work?  e.g.

template<typename... Args>
StringSwitch &Cases(Args &&... args, T value)

On Tue, Sep 5, 2017 at 5:19 PM Rui Ueyama via Phabricator <
reviews at reviews.llvm.org> wrote:

> ruiu added a comment.
>
> IIRC, it is tricky to use a template because all but the last parameter
> are of the same in `Cases`. If it takes `Value` as the first parameter, it
> would have been easier to use a template. But I'm not a C++ expert, so
> there may be a straightforward way of doing it.
>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D24882
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170906/6d9d3ee5/attachment.html>


More information about the llvm-commits mailing list