[cfe-dev] libcxx - variadic parameter packs not final argument in templates

Andrew Parker andrew.j.c.parker at gmail.com
Mon Mar 30 00:33:01 PDT 2015


In several files in libcxx the templates have argument lists where the
parameter pack is not last.  For example:

<tuple>

    template <class _Alloc, class ..._Up,
              class = typename enable_if
    ...[snip]...
    tuple(allocator_arg_t, const _Alloc& __a, _Up&&... __u)

or the many declarations of __invoke in <type_traits>.

I was under the impression that this wasn't valid syntax, i.e. that the
parameter pack should be the final argument.  Can someone enlighten me
here?  If I'm wrong then just point me at the correct source.

The reason I'm looking at this is I'm trying to compile with MSVC and it
really hates certain headers.  The errors are cryptic at best but seem to
originate from having args after the pack.

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150330/23643451/attachment.html>


More information about the cfe-dev mailing list