Fix the example code (make_uncertain() added otherwise the ?: operator is ambiguous).

This commit is contained in:
Sylvain Pion 2008-08-11 08:10:11 +00:00
parent 7d431c78ac
commit fea8090201
1 changed files with 2 additions and 2 deletions

View File

@ -281,13 +281,13 @@ Another option is :
\begin{ccExampleCode}
// Logical AND
Uncertain<bool> tmp = (p.x() == 0);
Uncertain<bool> res = certainly(!tmp) ? false : tmp & (p.y() == 0);
Uncertain<bool> res = certainly(!tmp) ? make_uncertain(false) : tmp & (p.y() == 0);
... // Use res
// Logical OR
Uncertain<bool> tmp = (q.x() == 0);
Uncertain<bool> res = certainly(tmp) ? true : tmp | (q.y() == 0);
Uncertain<bool> res = certainly(tmp) ? make_uncertain(true) : tmp | (q.y() == 0);
... // Use res
\end{ccExampleCode}