[英]Boost beast compilation error
d:\\ boost \\ boost \\ beast \\ core \\ detail \\ ostream.hpp(263):错误C2955:'boost :: beast :: detail :: ostream_helper':使用类模板需要模板参数列表
编译示例项目时:http_server_small.cpp(来自“兽”)
升压\\兽\\核心\\详细\\ ostream.hpp:
template<class DynamicBuffer, class CharT, class Traits>
ostream_helper<DynamicBuffer, CharT, Traits, true>::
ostream_helper(
ostream_helper&& other)
: std::basic_ostream<CharT, Traits>(&osb_)
, osb_(std::move(other.osb_))
{
}
Boost版本1.67.00,在Visual Studio v171(2017),x64下编译
在boost / beast lib中看起来像是一个错误,但是在lib的发行版中看到编译错误很奇怪。 (我不是lib的作者,我只是想使用它)。
也许我缺少一些编译选项或标志? 有没有人找出问题所在以及如何解决?
我认为必须是:
template<class DynamicBuffer, class CharT, class Traits>
ostream_helper<DynamicBuffer, CharT, Traits, true>::
ostream_helper(
ostream_helper<DynamicBuffer, CharT, Traits, true>&& other)
: std::basic_ostream<CharT, Traits>(&osb_)
, osb_(std::move(other.osb_))
{
}
无法看到任何编译器如何允许其他情况。
这看起来像是您的配置问题,因为1.是,它是有效的C ++,2.在所有配置中,我都可以使用最新的Visual Studio 2017毫无问题地编译它,并且3. AppVeyor脚本会定期编译库和示例,并且可以轻松编译它: https : //ci.appveyor.com/project/vinniefalco/beast/history
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.