mirror of
https://github.com/boostorg/functional.git
synced 2025-08-01 21:44:28 +02:00
Fix tests
This commit is contained in:
@@ -44,6 +44,10 @@ public:
|
|||||||
{
|
{
|
||||||
return -(l=r+val);
|
return -(l=r+val);
|
||||||
}
|
}
|
||||||
|
char operator()(int& l, int& r)
|
||||||
|
{
|
||||||
|
return l=r+val;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename Sig>
|
template <typename Sig>
|
||||||
struct result
|
struct result
|
||||||
@@ -89,8 +93,11 @@ int main()
|
|||||||
// lvalue,lvalue
|
// lvalue,lvalue
|
||||||
BOOST_TEST(( is_same<
|
BOOST_TEST(( is_same<
|
||||||
result_of< f(int&, int&) >::type, char >::value ));
|
result_of< f(int&, int&) >::type, char >::value ));
|
||||||
|
// result_of works differently for C++11 here, so compare
|
||||||
|
// with using it against test_func.
|
||||||
BOOST_TEST(( is_same<
|
BOOST_TEST(( is_same<
|
||||||
result_of< f const (int&, int&) >::type, char >::value ));
|
result_of< f const (int&, int&) >::type,
|
||||||
|
result_of< test_func<> const (int&, int&)>::type >::value ));
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@@ -44,6 +44,10 @@ public:
|
|||||||
{
|
{
|
||||||
return -(l=r+val);
|
return -(l=r+val);
|
||||||
}
|
}
|
||||||
|
char operator()(int & l, int & r)
|
||||||
|
{
|
||||||
|
return l=r+val;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename Sig>
|
template <typename Sig>
|
||||||
struct result
|
struct result
|
||||||
@@ -91,8 +95,11 @@ int main()
|
|||||||
// lvalue,lvalue
|
// lvalue,lvalue
|
||||||
BOOST_TEST(( is_same<
|
BOOST_TEST(( is_same<
|
||||||
result_of< f(ref, ref) >::type, char >::value ));
|
result_of< f(ref, ref) >::type, char >::value ));
|
||||||
|
// result_of works differently for C++11 here, so compare
|
||||||
|
// with using it against test_func.
|
||||||
BOOST_TEST(( is_same<
|
BOOST_TEST(( is_same<
|
||||||
result_of< f const (ref, ref) >::type, char >::value ));
|
result_of< f const (ref, ref) >::type,
|
||||||
|
result_of< test_func<> const (int&, int&) >::type >::value ));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
using boost::noncopyable;
|
using boost::noncopyable;
|
||||||
|
Reference in New Issue
Block a user