forked from boostorg/function
Clean up warnings on Borland C++ 5.5
[SVN r21095]
This commit is contained in:
@ -51,8 +51,8 @@ test_zero_args()
|
|||||||
{
|
{
|
||||||
typedef function0<void> func_void_type;
|
typedef function0<void> func_void_type;
|
||||||
|
|
||||||
write_five_obj five;
|
write_five_obj five = write_five_obj(); // Initialization for Borland C++ 5.5
|
||||||
write_three_obj three;
|
write_three_obj three = write_three_obj(); // Ditto
|
||||||
|
|
||||||
// Default construction
|
// Default construction
|
||||||
func_void_type v1;
|
func_void_type v1;
|
||||||
@ -472,7 +472,8 @@ test_zero_args()
|
|||||||
BOOST_TEST(global_int == 5);
|
BOOST_TEST(global_int == 5);
|
||||||
|
|
||||||
// Const vs. non-const
|
// Const vs. non-const
|
||||||
write_const_1_nonconst_2 one_or_two;
|
// Initialization for Borland C++ 5.5
|
||||||
|
write_const_1_nonconst_2 one_or_two = write_const_1_nonconst_2();
|
||||||
const function0<void> v7(one_or_two);
|
const function0<void> v7(one_or_two);
|
||||||
function0<void> v8(one_or_two);
|
function0<void> v8(one_or_two);
|
||||||
|
|
||||||
@ -495,9 +496,9 @@ test_zero_args()
|
|||||||
|
|
||||||
// Test return values
|
// Test return values
|
||||||
typedef function0<int> func_int_type;
|
typedef function0<int> func_int_type;
|
||||||
generate_five_obj gen_five;
|
// Initialization for Borland C++ 5.5
|
||||||
generate_three_obj gen_three;
|
generate_five_obj gen_five = generate_five_obj();
|
||||||
|
generate_three_obj gen_three = generate_three_obj();
|
||||||
func_int_type i0(gen_five);
|
func_int_type i0(gen_five);
|
||||||
|
|
||||||
BOOST_TEST(i0() == 5);
|
BOOST_TEST(i0() == 5);
|
||||||
@ -530,7 +531,7 @@ test_zero_args()
|
|||||||
static void
|
static void
|
||||||
test_one_arg()
|
test_one_arg()
|
||||||
{
|
{
|
||||||
negate<int> neg;
|
negate<int> neg = negate<int>(); // Initialization for Borland C++ 5.5
|
||||||
|
|
||||||
function1<int, int> f1(neg);
|
function1<int, int> f1(neg);
|
||||||
BOOST_TEST(f1(5) == -5);
|
BOOST_TEST(f1(5) == -5);
|
||||||
|
Reference in New Issue
Block a user