From 15b34d0bf4c16304adabe38bd7671aa0653233a9 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 22 Oct 2007 19:37:05 +0000 Subject: [PATCH 1/2] Fix warnings from GCC 4.3. Fixes #1337 [SVN r40299] --- include/boost/logic/tribool.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/logic/tribool.hpp b/include/boost/logic/tribool.hpp index 2cc501c..229feb4 100644 --- a/include/boost/logic/tribool.hpp +++ b/include/boost/logic/tribool.hpp @@ -336,7 +336,7 @@ inline tribool operator==(tribool x, tribool y) if (indeterminate(x) || indeterminate(y)) return indeterminate; else - return x && y || !x && !y; + return (x && y) || (!x && !y); } /** @@ -399,7 +399,7 @@ inline tribool operator!=(tribool x, tribool y) if (indeterminate(x) || indeterminate(y)) return indeterminate; else - return !(x && y || !x && !y); + return !((x && y) || (!x && !y)); } /** From 24117db3aea17b43e6d312286ada392cecf02296 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 25 Jan 2008 21:07:14 +0000 Subject: [PATCH 2/2] Include to get std::boolalpha. Fixes #1586 [SVN r42972] --- test/tribool_io_test.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/test/tribool_io_test.cpp b/test/tribool_io_test.cpp index d7254f1..84bce90 100644 --- a/test/tribool_io_test.cpp +++ b/test/tribool_io_test.cpp @@ -8,6 +8,7 @@ #include #include #include +#include // for std::boolalpha #ifndef BOOST_NO_STD_LOCALE # include