【发布时间】:2015-04-15 22:22:28
【问题描述】:
如何检查空的 boost::accumulators acc 与否?
例如:
if (acc.isEmpty())//I don't know what function here
return 0;
else
return boost::accumulators::mean(acc).
因为如果它是空的,我会得到 NaN for boost::accumulators::mean(acc)。
【问题讨论】:
-
在某些平台上,nan 可能会发出信号(我不确定标准是否指定了这一点)
标签: c++ boost nan boost-accumulators