Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
g++有可能以比我指定的旧标准编译我的程序吗?
我编译:
g++ -Wall -Wextra -pedantic -O3 -std=c++2a -fconcepts
并且编译器无法识别 bind_front 函数(我包括在内<functional>)。编译器版本是 GCC 8.3。
<functional>
GCC 8.3 不支持std::bind_front. 在这里检查。
std::bind_front
您需要使用 GCC 9.1 或 9.2。在这里检查。
如何安装 GCC 9?
更新
正如@walnut的评论所说,自 Ubuntu 19.04 以来标准存储库中有一个 g++ 9 包。