#180: algebra::vec's != operators cannot be used. ---------------------+------------------------------------------------------ Reporter: lazzara | Owner: Olena Team Type: defect | Status: new Priority: major | Milestone: Olena 1.0 Component: Milena | Version: 1.0 Keywords: | ---------------------+------------------------------------------------------ The following example does not compile.
test.cc: {{{ # include <mln/algebra/vec.hh> int main() { using namespace mln::algebra; vec<3, float> a, b; bool c = (a != b); } }}}
g++ -I. test.cc {{{ test.cc: In function 'int main()': test.cc:6: error: cannot convert 'mln::algebra::vec<3u, bool>' to 'bool' in initialization ./mln/core/routine/ops.hh: In function 'typename mln::trait::op::neq<L, R>::ret mln::operator!=(const mln::Object<E>&, const mln::Object<O2>&) [with O1 = mln::algebra::vec<3u, float>, O2 = mln::algebra::vec<3u, float>]': test.cc:6: instantiated from here ./mln/core/routine/ops.hh:528: error: conversion from 'bool' to non-scalar type 'mln::algebra::vec<3u, bool>' requested }}}
Note that if '(a != b)' is replaced by '(a == b)' or '!(a == b)', this example compiles.
#180: algebra::vec's != operators cannot be used. ----------------------+----------------------------------------------------- Reporter: lazzara | Owner: Olena Team Type: defect | Status: closed Priority: major | Milestone: Olena 1.0 Component: Milena | Version: 1.0 Resolution: fixed | Keywords: ----------------------+----------------------------------------------------- Changes (by lazzara):
* status: new => closed * resolution: => fixed
Comment:
Fixed in r3920 by Theo.
'!=' operator was not declared properly.
There are still operators which needs to be declared properly. See ticket #42.