Make Boost.Function's target() operation respect the cv-qualifiers of referenced function objects. Fixes #736

[SVN r48618]
This commit is contained in:
Douglas Gregor committed 2008-09-05 17:52:12 +00:00
1 parent ea18f5777b
commit f379ef8532
4 files changed
+98 -36

No files matched your search

+9
View File
@@ -88,6 +88,15 @@ static void target_test()
BOOST_CHECK(!f.target<int (*)()>());
BOOST_CHECK(f.target<Seventeen>());
BOOST_CHECK(f.target<Seventeen>() == &this_seventeen);
const Seventeen const_seventeen = this_seventeen;
f = boost::ref(const_seventeen);
BOOST_CHECK(!f.target<int (*)()>());
BOOST_CHECK(f.target<const Seventeen>());
BOOST_CHECK(f.target<const Seventeen>() == &const_seventeen);
BOOST_CHECK(f.target<const volatile Seventeen>());
BOOST_CHECK(!f.target<Seventeen>());
BOOST_CHECK(!f.target<volatile Seventeen>());
}
static void equal_test()