[llvm-bugs] [Bug 48056] New: ICE on use of constexpr in lambda parameter type

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Nov 2 19:18:27 PST 2020


https://bugs.llvm.org/show_bug.cgi?id=48056

            Bug ID: 48056
           Summary: ICE on use of constexpr in lambda parameter type
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++2a
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ldalessandro 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

Forgive me, this one's a bit hard to describe and/or search for, so it's
possibly a duplicate. 

https://godbolt.org/z/c1P9sr


```
#include <array>
#include <utility>

struct Foo {
    int n;
};

constexpr bool foo() {
    constexpr std::array<Foo, 2> foos = { 1, 2 };
    [&]<std::size_t... is>(std::index_sequence<is...>) {
        ([&](std::array<int, foos[is].n>) {}, ...);
    }(std::make_index_sequence<size(foos)>());
    return true;
}

static_assert(foo());
```

-- 
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/20201103/c452101e/attachment.html>


More information about the llvm-bugs mailing list