User account creation filtered due to spam.
As pointed out on SO, g++ still compiles:
std::cout << std::cout
In C++11 the stream testing operator was changed from:
operator void*() const;
explicit operator bool() const;
A quick patch is being tested now.
The target is 4.9 even though it is simple.
Created attachment 29343 [details]
Patch including testcase.
Here is a small patch. I'm not ure the bast place to put the testcase.
Testing is underway.
The change builds and fails to compile the testcase as expected on x86_64-unknown-linux.
Fixed by http://gcc.gnu.org/ml/gcc-cvs/2013-02/msg00222.html
Date: Mon Feb 11 10:30:43 2013
New Revision: 195939
2013-02-11 Paolo Carlini <email@example.com>
2013-02-06 Edward Smith-Rowland <firstname.lastname@example.org>
* include/bits/basic_ios.h: Replace operator void*() const
with explicit operator bool() const in C++11 and greater.
* testsuite/27_io/basic_ios/pr56193.cc: New file.
Patch reverted. Better simply do this in the next ABI.
PR 56282 has a patch that could serve as a starting point for the symbol versions file
Indeed, thanks Jon.
@Paolo, any ETA for this entering a trunk?
I just noticed the same problem that in C++11 code (and beyond) the following code compiles due to the existence of the implicit conversion to void*:
bool test = (std::cout == std::cerr);
It will be ready when it's ready - there are bigger issues that are higher priority
(In reply to Jonathan Wakely from comment #9)
Date: Wed Sep 24 22:13:35 2014
New Revision: 215571
* config/abi/pre/gnu.ver: Add new exports.
* include/bits/basic_ios.h (basic_ios::operator bool): Define.
* src/c++98/ios_locale.cc (basic_ios::operator void*): Instantiate.