在g ++中找不到可选

时间:2018-09-27 11:33:20

标签: c++ g++ debian

我有一个使用“可选”的c ++程序。

我已在文件顶部(第4行)中使用#include <optional>导入了该文件,并且正在使用g++ -std=c++17 -o name.o -c source.cpp行进行编译,但即使如此,我仍然遇到此错误:

source.cpp:4:20: fatal error: optional: No such file or directory 
 #include <optional>
                    ^
compilation terminated.

我的操作系统:Debian GNU / Linux 9(拉伸)64位

g ++版本:6.3.0

g ++已安装sudo apt -y install build-essential

有人知道可能是什么问题吗?

0 个答案:

没有答案
相关问题