问题标签 [boost-interval]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
1518 浏览

c++ - C++ Boost Interval 和 cos

我在使用 Boost 的 Interval 库时遇到问题

我收到以下编译错误:

我尝试了几种组合,interval_lib::policies但无法编译示例。我不追求非常高的精度。我想要的基本上是添加两个间隔相当于添加两个doubles。

0 投票
1 回答
131 浏览

c++ - boost::icl::interval 和 boost::numeric::interval 是否有可用的适配层?

我一直在我的代码中到处使用boost::numeric::interval 。现在我已经开始使用boost interval 容器库了。是否存在适配标头,因此我可以将 boost::numeric::interval 间隔放入 boost::icl 容器中?

我已经按照 boost::icl 的定制文档中的建议尝试了以下代码,但它没有与多行模板专业化失败消息一起编译。如果您想查看错误消息,可以在以下位置尝试实时代码

https://wandbox.org/permlink/P8VzcdbjQQzf43yU

我写的代码也在下面。

适配代码

测试代码