[cfe-dev] [libc++] possible bug?
Marc Glisse
marc.glisse at inria.fr
Sun Apr 22 14:32:28 PDT 2012
On Sun, 22 Apr 2012, Ovanes Markaryan wrote:
> Hello *,
> just tried to compile SYMPHONY-5.4.4 with clang 3.0 + libc++ (tag 31). While
> compiling it I receive this error:
>
> include/c++/v1/algorithm:643:97: error: invalid operands to binary
> expression
> ('const reducedCost' and 'const reducedCost')
> _LIBCPP_INLINE_VISIBILITY bool operator()(const _T1& __x, const _T1&
> __y) const {return __x < __y;}
[...]
> bool operator<(const reducedCost & other)
Missing const here. It is often preferable to avoid making operators
member functions when you can avoid it.
> {
> return (value>other.value);
> }
--
Marc Glisse
More information about the cfe-dev
mailing list