Ticket #7162 (closed Bugs: fixed)
socket streams crash with C++11 enabled; tie(this) no longer legal
|Reported by:||andrew.c.morrow@…||Owned by:||chris_kohlhoff|
|Milestone:||To Be Determined||Component:||asio|
|Version:||Boost Development Trunk||Severity:||Problem|
The boost::asio sockets streams classes derive from std::basic_iostream, and then call tie(this)] in the basic_socket_iostream constructor.
In C++11 this is no longer legal (I tried providing a link here, but trac wouldn't let me). The issue is explained here: cplusplus.github.com/LWG/lwg-defects.html#835
Some standard libraries (like libc++) already implement this behavior, and so attempts to use the ASIO socket streams classes cause infinite recursion leading to eventual stack exhaustion and a crash.
I found this issue in boost 1.50.0, but it appears on the boost trunk svn as well so I have filled the ticket against trunk.