After running:
g++ --std=c++11 -ansi -pedantic-errors -Wall -o test_database test_database.cpp
I am receiving the following errors:
./database.h:40:10: error: 'auto' type specifier is a C++11 extension [-Werror,-Wc++11-extensions]
for (auto x:composerMap_) {
^
./database.h:40:16: error: range-based for loop is a C++11 extension [-Werror,-Wc++11-extensions]
for (auto x:composerMap_) {
Yet note that I have already added the '--std=c++11' flag recommended in many other stackoverflow posts similar to this one. This has wasted several hours for me. How do I get past this? I am on macOS monterey 12.1. Here are details about the version of g++ I am using:
g++ --version
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.30)
Target: arm64-apple-darwin21.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin