g++ - Is operator void*() conversion still part of C++ library? -


consider program:

#include <iostream> int main() {     delete std::cout; } 

afaik conversion function operator void* () const has been removed c++11. so, program should fail in compilation on c++11 compiler. ya, true both g++ 4.8.1 & 4.9.2 gives diagnosis (in form of warning deleting void* undefined & that's thing). shouldn't program fail in compilation because removal of conversion function due stream object implicitly converted void* in c++98 & c++03?. bug? seems bit surprising still not have implemented change.

i've tried program in g++ 4.9.2(that supports c++14) gives warning not compiler error. ideone compiler gives me error expected. (see live demo here)

it has nothing compiler, library issue. libstdc++ has lots of incompatibilities c++11, of one. making breaking changes in 5 , though iirc.

in short, it's neither bug nor compiler issue.


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -