<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Crush on choosing operator () of parent lambda in derived class"
href="https://llvm.org/bugs/show_bug.cgi?id=25430">25430</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Crush on choosing operator () of parent lambda in derived class
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.7
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>tomilovanatoliy@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Code:
#include <iostream>
#include <type_traits>
#include <cstdlib>
template< bool condition >
void
f()
{
auto static_if = [] (auto... l)
{
struct S : std::decay_t< decltype(l) >...
{
//using std::decay_t< decltype(l) >::operator ();
S(decltype(l)... _l) : std::decay_t< decltype(l) >{_l}... { ; }
} s{l...};
return s;
};
static_if([] (std::true_type) { std::cout << 1 << std::endl; }, []
(std::false_type) { std::cout << 2 << std::endl; })(std::integral_constant<
bool, condition >{});
}
int
main()
{
f< true >();
f< false >();
return EXIT_SUCCESS;
}
Build command:
clang++ -std=gnu++1z -stdlib=libc++ -O3 -Wall -Wextra -Weverything -pedantic
-Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-c++98-compat main.cpp -o
a.out && ./a.out
Error message:
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.7.0 (tags/RELEASE_370/final 246979)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/main-1305dd.cpp
clang: note: diagnostic msg: /tmp/main-1305dd.sh
clang: note: diagnostic msg:
********************</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>