查看: 2970|回复: 2

[kaldi]openfst error: ./../include/fst/float-weight.h:229:1: error: non-const...

[复制链接]

665

主题

1234

帖子

6670

积分

xdtech

Rank: 5Rank: 5

积分
6670
发表于 2019-1-15 10:32:42 | 显示全部楼层 |阅读模式
kaldi, openfst_1.7

error: ./../include/fst/float-weight.h:229:1: error: non-constant condition for static assertion

solution:

you can simply comment out or remove the static_assert lines in float-weight.h. That should be entirely harmless, and we'll most likely (re)move those lines very soon.
With the static_assert's present, the best working hypothesis is that there is some misunderstanding or disagreement about which expressions are in fact constexpr in C++11. Your compilation fails for static_assert(TropicalWeight::NoWeight().Member(), "NoWeight not member"), which involves the expanded subexpression (+QNaNf >= -3.40282347e+38f) which the compiler considers to not be a constant expression. Either way, that's a problem. If the compiler is right, that's most definitely a problem; if the compiler is wrong, it still requires a workaround.

回复

使用道具 举报

38

主题

84

帖子

243

积分

中级会员

Rank: 3Rank: 3

积分
243
发表于 2019-1-16 09:09:21 | 显示全部楼层
这是1.7.0版本的错误
很有意思的
错误
并且
这个解决方案,是作者提出来的
回复

使用道具 举报

38

主题

84

帖子

243

积分

中级会员

Rank: 3Rank: 3

积分
243
发表于 2019-1-16 09:09:46 | 显示全部楼层
c++的版本
也是坑人
不兼容
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表