[LLVMbugs] [Bug 18180] New: Compilation error with boost::optional (from Boost 1.55)
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Dec 8 18:55:10 PST 2013
http://llvm.org/bugs/show_bug.cgi?id=18180
Bug ID: 18180
Summary: Compilation error with boost::optional (from Boost
1.55)
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: benpope81 at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 11690
--> http://llvm.org/bugs/attachment.cgi?id=11690&action=edit
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.
--
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/20131209/5cf2408d/attachment.html>
More information about the llvm-bugs
mailing list