------- Comment #2 from deba at inf dot elte dot hu  2008-07-25 10:24 -------
(In reply to comment #1)
> Example?
> 

In the LEMON graph library  (http://lemon.cs.elte.hu/) there is an LP solver
interface. The LP constraints could be added like the next formulation:
lp.addRow((double) <= (Lp::Expr) <= (double));
For example:
Lp::Col x1, x2, x3;
lp.addRow(2 <= 2 * x1 + 3 * x2 - 2 * x3 <= 8);
Because the C++ allows overriding every operator, it looks like a good solution
for define range constraints. However, if the -Wparentheses or -Wall is
defined, it emits warnings. For the C language, the warning is a proper
behavior, but the C++ has boolean type, so rather the bool-numeric comparisons
should be warned.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36921

Reply via email to