When I try to use some C ++ 17 features, I create my code on the command line as follows:
llvm-g++ -std=c++17 main.cpp
but it failed. I got:
error: invalid value 'c++17' in '-std=c++17'
version of my llvm-g ++:
[wjy@wjy-mba] cpp$ llvm-g++ -v
Apple LLVM version 9.0.0 (clang-900.0.37)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
and at the same time, I can create my code in Xcode (using C ++ 17).
Xcode Settings
source
share