I have clang 13.0.0 on my Mac. I'm trying to compile some .cpp files using the command
g++ file.cpp -o file
But I get this warning message:
file.cpp:23:26: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for (const double &e : timestamp) outFile << std::setprecision(10) << e << "\n";
On the clang documentation is said that c++11 is supported by clang 13. On my terminal running man clang I find: The default C++ language standard is gnu++14.
Typing g++ -v I get:
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.29.3)
Target: arm64-apple-darwin21.1.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Why am I getting this warning?