From: John P. <jwp...@gm...> - 2014-09-12 15:06:29
|
On Fri, Sep 12, 2014 at 4:23 AM, Eduardo Hernandez <Edu...@cs...> wrote: > > This line of code has been in the library forever and never given us > any trouble, but now that I look at it closely I'm not sure you are > allowed to compare two streams for equality like this. Can you try > changing that line of code to: > > if (os.rdbuf() == std::cout.rdbuf()) > > instead, and see if your compiler likes that any better? > > > Yes! This did the trick! I have now managed to compile and run the tests and everything seems to be fine now. Thank you very much for your assistance. I'm glad it works. After some additional testing, this appears to be code that fails in clang with -std=c++0x and -std=c++11, but works otherwise. GCC 4.7 still seems to accept it for all -std options. Possibly they have done something in the new C++ standard to explicitly delete/disable this behavior. -- John |