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

            Bug ID: 49517
           Summary: initializer_list storage considered a temporary when
                    accessed through NTTP
           Product: clang
           Version: trunk
          Hardware: PC
               URL: https://godbolt.org/z/aWGr3P
                OS: Linux
            Status: NEW
          Keywords: compile-fail
          Severity: enhancement
          Priority: P
         Component: C++2a
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

See https://godbolt.org/z/aWGr3P.
```C++
#include<initializer_list>
constexpr std::initializer_list<bool>il{true};
template<const bool*B>constexpr bool front=B[0];
static_assert(front<il.begin()>);
```
https://timsong-cpp.github.io/cppwp/n4861/dcl.init.list#5 explains its storage.
https://timsong-cpp.github.io/cppwp/n4861/dcl.init.list#6 explains its
lifetime.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to