avhttp在vc++ 2010下编译提示 ostream_iterator冲突


#1

我这标题都想不明白了

avhttp\include\avhttp\detail\escape_string.hpp

template <typename Source>
std::string encode_base64(const Source& s)
{
	using namespace boost::archive::iterators;
	typedef typename Source::const_iterator source_const_iterator;
	typedef base64_from_binary<
		transform_width<
			source_const_iterator,
			6,
			8
		>
	> base64_text;
	std::stringstream os;
	std::copy(base64_text(s.begin()), base64_text(s.end()), boost::archive::iterators::ostream_iterator<char>(os));
	std::string result = os.str();
	int padding = 4 - result.size() % 4;
	for (int i = 0; i < padding; i++)
		result += "=";
	return result;
}

174行

std::copy(base64_text(s.begin()), base64_text(s.end()), ostream_iterator<char>(os));

ostream_iterator 提示 boost::archive::iterators::ostream_iterator 和 std::ostream_iterator 不确定是那个


#2

没想到啊,vc2010还这么严格,居然会冲突,已经修复:https://github.com/avplayer/avhttp/commit/3f69ca8c5a6d8c2c66ab708dc855b2d78a3dfef5

谢谢你的错误报告。