Skip to content

Commit d18c778

Browse files
committed
fix a static initialization fiasco with ios_base
see http://stackoverflow.com/questions/12318693/c-segmentation-fault- when-using-cout-in-static-variable-initialization for a reference of what was happening when iostreams were used within boost.python registry's global static ctors.
1 parent 5dce794 commit d18c778

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

include/boost/python/converter/registered.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
# include <boost/python/type_id.hpp>
1515
# include <boost/type.hpp>
1616

17+
#if defined(BOOST_PYTHON_TRACE_REGISTRY) \
18+
|| defined(BOOST_PYTHON_CONVERTER_REGISTRY_APPLE_MACH_WORKAROUND)
19+
# include <iostream>
20+
#endif
21+
1722
namespace boost {
1823

1924
// You'll see shared_ptr mentioned in this header because we need to

0 commit comments

Comments
 (0)