gpt4 book ai didi

c++ - 如何启用std::experimental::atomic_shared_pointer

转载 作者:行者123 更新时间:2023-12-02 10:37:45 25 4
gpt4 key购买 nike

我正在使用Ubuntu 16.04。我有gcc-9.2.0,但是我在/usr/local/include/c++/9.2.0/experimental中找不到原子头文件,我想我在编译gcc时必须启用它,或者必须手动安装它,但是我没有找到任何提示所以。

最佳答案

所以我现在对std::experimental::atomic_shared_pointer的理解是std::atomic(std::shared_ptr),所以我认为没有(也许不会)启用std::experimental::atomic_shared_pointer的任何方法。

这就是我也要解释的方式
en.cppreference.com: std::experimental::atomic_shared_ptr:

Merged into ISO C++ The functionality described on this page was merged into the mainline ISO C++ standard as of 11/2017; see std::atomic> (since C++20)

关于c++ - 如何启用std::experimental::atomic_shared_pointer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59517197/

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