mirror of
https://github.com/boostorg/function.git
synced 2025-07-27 19:37:15 +02:00
Check the const function_cast function
[SVN r11364]
This commit is contained in:
@ -551,6 +551,7 @@ test_one_arg()
|
|||||||
const function1<int, int> cf2(add_to);
|
const function1<int, int> cf2(add_to);
|
||||||
BOOST_TEST(cf2(3) == 8);
|
BOOST_TEST(cf2(3) == 8);
|
||||||
BOOST_TEST(cf2.target_type() == typeid(add_to_obj));
|
BOOST_TEST(cf2.target_type() == typeid(add_to_obj));
|
||||||
|
BOOST_TEST(function_cast<add_to_obj>(cf2).value == 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -551,6 +551,7 @@ test_one_arg()
|
|||||||
const function<int, int> cf2(add_to);
|
const function<int, int> cf2(add_to);
|
||||||
BOOST_TEST(cf2(3) == 8);
|
BOOST_TEST(cf2(3) == 8);
|
||||||
BOOST_TEST(cf2.target_type() == typeid(add_to_obj));
|
BOOST_TEST(cf2.target_type() == typeid(add_to_obj));
|
||||||
|
BOOST_TEST(function_cast<add_to_obj>(cf2).value == 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Reference in New Issue
Block a user