Clang导致segfault与boost库g ++工作。 OS X.

时间:2013-10-27 04:00:03

标签: c++ macos boost c++11

我正在使用boost/iostreams/filtering/gzip.hpp库,由于某种原因,它适用于g ++(4.2 - 古老版本,预装在mac上),但使用clang ++编译完全相同的代码会导致故障:

std::ifstream file(fname.c_str(), std::ios_base::in | std::ios_base::binary);
boost::iostreams::filtering_istream in;
in.push(boost::iostreams::gzip_decompressor()); // This line causes the segfault
in.push(file);

我不知道导致问题的原因。有什么建议吗?

0 个答案:

没有答案