? true : false hack

[SVN r14874]
This commit is contained in:
Douglas Gregor
2002-08-15 03:22:31 +00:00
parent 893069311a
commit 3e2a2b6c55
3 changed files with 20 additions and 20 deletions

View File

@ -140,7 +140,7 @@ test_zero_args()
// Construction from another function (that is empty)
v1.clear();
func_void_type v2(v1);
BOOST_TEST(!v2);
BOOST_TEST(!v2? true : false);
// Assignment to an empty function
v2 = three;
@ -164,7 +164,7 @@ test_zero_args()
// Assignment to an empty function from a free function
v2 = (BOOST_FUNCTION_TARGET_FIX(&) write_five);
BOOST_TEST(v2);
BOOST_TEST(v2? true : false);
// Invocation
global_int = 0;
@ -248,7 +248,7 @@ test_zero_args()
// clear() method
v3.clear();
BOOST_TEST(!v3);
BOOST_TEST(!v3? true : false);
// Assignment to an empty function
v3 = three;
@ -505,9 +505,9 @@ test_zero_args()
BOOST_TEST(i0() == 5);
i0 = &generate_three;
BOOST_TEST(i0() == 3);
BOOST_TEST(i0);
BOOST_TEST(i0? true : false);
i0.clear();
BOOST_TEST(!i0);
BOOST_TEST(!i0? true : false);
// Test return values with compatible types
typedef function<long> func_long_type;
@ -520,9 +520,9 @@ test_zero_args()
BOOST_TEST(i1() == 5);
i1 = &generate_three;
BOOST_TEST(i1() == 3);
BOOST_TEST(i1);
BOOST_TEST(i1? true : false);
i1.clear();
BOOST_TEST(!i1);
BOOST_TEST(!i1? true : false);
}
static void