GCC 8.3无法编译std :: bind_front

问题描述 投票:0回答:1

g ++是否有可能以比我指定的标准更高的标准编译我的程序?

我编译为:

  g++ -Wall -Wextra -pedantic -O3 -std=c++2a -fconcepts

并且编译器无法识别bind_front函数(我包含<functional>)。编译器版本为GCC 8.3。

c++ compilation standards c++20 gcc8
1个回答
2
投票

GCC 8.3不支持std::bind_front。检查here

您需要使用GCC 9.1或9.2。检查here

How to install GCC 9?

UPDATE

[@walnut的评论说,自Ubuntu 19.04起,标准存储库中有一个g ++ 9软件包。

© www.soinside.com 2019 - 2024. All rights reserved.