<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 --- - Error when initializing an boost::optional with std::tuple"
href="https://llvm.org/bugs/show_bug.cgi?id=30961">30961</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Error when initializing an boost::optional with std::tuple
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.8
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>FreeBSD
</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++14
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>akrzemi1@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>The following program fails to compile in clang 3.8 and 3.7, with Boost 1.61 or
1.62, with -std=c++14 -stdlib=libc++ :
```
#include <boost/optional.hpp>
#include <tuple>
using Tup = std::tuple<boost::optional<int>>;
const Tup x;
boost::optional<Tup> y = x;
int main() {}
```
See here:
<a href="http://melpon.org/wandbox/permlink/j9ZiYms0x3L9hIuF">http://melpon.org/wandbox/permlink/j9ZiYms0x3L9hIuF</a>
It starts to compile when I change to GCC, or when I change the standard to
-std=c++11.
For some reason, it fails so see the optional<T> constructor taking T const& is
not picked. However the diagnostic messages give no hint why this is so.</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>