我想更准确地使用c++20特性std::binary_semaphore。我已经安装了g++-10,但它不承认binary_semaphore是性病类型。我输入了以下命令g++ -std=c++2a main.cpp -o main。错误信息是:
错误:“binary_semaphore”未在‘std’6>中使用std::binary_semaphore声明;
我能做些什么?
发布于 2021-05-26 11:38:39
根据‘s首选项编译器支持表的说法,原子等待和通知、std::counting_semaphore__、std::latch和std::barrier等事物从GCC 11起就得到了支持。您声称安装了GCC 10,但不支持上述功能。
https://stackoverflow.com/questions/67701579
复制相似问题