[llvm-bugs] [Bug 40380] New: pack expansion not correctly expended with pointer types

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jan 19 12:25:40 PST 2019


            Bug ID: 40380
           Summary: pack expansion not correctly expended with pointer
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++'17
          Assignee: unassignedclangbugs at nondot.org
          Reporter: robin.moussu at gmail.com
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

The following code doesn't compile:

template<class ...Ts>
auto f3( Range r )
    auto apply = [&](auto* x){ return x->parse(r); };
    return std::tuple{apply((Ts*){})...};

The following error is returned:

<source>:22:37: error: pack expansion does not contain any unexpanded parameter
    return std::tuple{apply((Ts*){})...};

Full example (it compiles with gcc):

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190119/b00cc274/attachment.html>

More information about the llvm-bugs mailing list