Fix tests

This commit is contained in:
Daniel James
2016-05-27 08:38:54 +01:00
parent a43bbfe34c
commit c6f1cf79c6
2 changed files with 16 additions and 2 deletions

View File

@@ -44,6 +44,10 @@ public:
{
return -(l=r+val);
}
char operator()(int& l, int& r)
{
return l=r+val;
}
template <typename Sig>
struct result
@@ -89,8 +93,11 @@ int main()
// lvalue,lvalue
BOOST_TEST(( is_same<
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<
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 ));
}
{

View File

@@ -44,6 +44,10 @@ public:
{
return -(l=r+val);
}
char operator()(int & l, int & r)
{
return l=r+val;
}
template <typename Sig>
struct result
@@ -91,8 +95,11 @@ int main()
// lvalue,lvalue
BOOST_TEST(( is_same<
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<
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;