Boost logo

Boost :

Subject: Re: [boost] Compile error on function.mem_fun_cxx98 regression test
From: Peter Dimov (lists_at_[hidden])
Date: 2014-04-09 04:42:51

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.

Boost list run by bdawes at, gregod at, cpdaniel at, john at