
#268: Rework value types promotion rules? ------------------------+------------------------ Reporter: levill_r | Owner: Olena Team Type: proposal | Status: new Priority: major | Milestone: Component: Milena | Version: 2.0 Keywords: conversion | ------------------------+------------------------ Milena values types seem to follow the same promotion rules as C++'s (where an operation between a signed value and an unsigned value promote the signed value to an unsigned one; see http://stackoverflow.com/a/5563131/1551751). For example, the following code breaks the assertion of the last line, as `i` seems to get promoted from `int` to `unsigned` in the comparison with `j` (because `j` is probably cast to `unsigned` as well): {{{ #!c++ int i = -3; mln::value::int_u8 j = 5; mln_assertion(i < j); }}} Do we want to keep this behavior? Or change promotions rules? Or trigger a compile- or run-time warning? Or a compile- or run-time error? -- Ticket URL: <https://trac.lrde.epita.fr/olena/ticket/268> Olena <http://olena.lrde.epita.fr> Olena, a software platform dedicated to image processing.