9 Apr
2014
9 Apr
'14
8:42 a.m.
Chris Cooper wrote:
When I try to compile function.mem_fun_cxx98 it gives me this error:
mem_fun_cxx98.cpp:34:46: error: invalid operands to binary expression ('std::__1::basic_ostream<char>' and 'ostream' (aka 'basic_ostream<char>')) BOOST_TEST(f2(&x, boost::ref(std::cout)) == std::cout);
This is a problem with the test. It should probably say BOOST_TEST( &f2(&x, boost::ref(std::cout)) == &std::cout ); You can say std::cout == std::cout in pre-C++11, but it doesn't do anything sensible. This no longer compiles in C++11.