<html>
<head>
<base href="http://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 --- - Compilation error with boost::optional (from Boost 1.55)"
href="http://llvm.org/bugs/show_bug.cgi?id=18180">18180</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Compilation error with boost::optional (from Boost 1.55)
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>benpope81@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=11690" name="attach_11690" title="Preprocessed source">attachment 11690</a> <a href="attachment.cgi?id=11690&action=edit" title="Preprocessed source">[details]</a></span>
Preprocessed source
Unfortunately I haven't managed to reduce the preprocessed output, but the gist
of it is this:
#include <boost/optional.hpp>
int main()
{
boost::optional<int> max;
return max == false;
}
clang++-3.4 -std=c++11 -stdlib=libc++ -I../boost/test/build/boost -lc++abi
signal_test.cpp
signal_test.cpp:6:15: error: invalid operands to binary expression
('boost::optional<int>' and 'int')
return max == false;
~~~ ^ ~~~~~
../boost/test/build/boost/boost/optional/optional.hpp:838:6: note: candidate
function [with T = int] not viable: no known conversion from 'bool' to 'none_t'
(aka 'int boost::detail::none_helper::*') for 2nd
argument
bool operator == ( optional<T> const& x, none_t )
^
../boost/test/build/boost/boost/optional/optional.hpp:769:6: note: candidate
template ignored: deduced conflicting types for parameter 'T' ('int' vs.
'bool')
bool operator == ( optional<T> const& x, T const& y )
^
../boost/test/build/boost/boost/optional/optional.hpp:735:6: note: candidate
template ignored: could not match 'optional<type-parameter-0-0>' against 'bool'
bool operator == ( optional<T> const& x, optional<T> const& y )
^
../boost/test/build/boost/boost/optional/optional.hpp:803:6: note: candidate
template ignored: could not match 'optional<type-parameter-0-0>' against 'bool'
bool operator == ( T const& x, optional<T> const& y )
^
../boost/test/build/boost/boost/optional/optional.hpp:872:6: note: candidate
template ignored: could not match 'optional<type-parameter-0-0>' against 'bool'
bool operator == ( none_t , optional<T> const& y )
This code compiles with Clang 3.3 and G++-4.8.2, but I haven't verified whether
it's correct. Preprocessed source attached.</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>