gpt4 book ai didi

c++ - `boost::xtime_get` 是否已弃用?

转载 作者:行者123 更新时间:2023-11-28 04:24:34 25 4
gpt4 key购买 nike

我偶然发现一些信息表明 boost::xtime_get() 自 boost 1.34 以来已被弃用。真的吗?如果是这样,我在哪里可以找到这方面的权威声明?

最佳答案

不完全是;它自 1.35 以来已被弃用。

对于权威声明,我会求助于 1.35 documentation for Boost.Thread ,特别是标题为 Changes since boost 1.34 的部分:

boost::xtime is supported for backwards compatibility only.

至于发生这种情况的原因,同一个要点提到 DateTime 库用于超时。在 1.34 中,xtime被记录为临时措施:

[...] it is expected that [xtime] (or some other time library) will be provided in Boost as a separate library, at which time Boost.Thread will deprecate its own implementation.

在 Boost 1.35 中,DateTime 变成了那个单独的库,因此 Boost.Thread 弃用了它的实现。

关于c++ - `boost::xtime_get` 是否已弃用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54682117/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com