I tried to compile the following program with different compilers (including gcc 6.1) :
#include <optional>
int main()
{
std::optional<int> o1;
}
Output is
main.cpp:1:20: fatal error: optional: No such file or directory #include optional
This is even true for the examples given here: http://en.cppreference.com/w/cpp/utility/optional/optional
Any clues why?