Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid erroring on C++17 extensions under Clang
google/googletest@5a37b517ad introduced a check on `__has_cpp_attribute(maybe_unused)`. Under Clang it evaluates to true even in `-std=c++14` mode, but subsequently the use of the `[[maybe_unused]]` attribute triggers a `-Wc++17-extensions` warning which we elevate to an error via `-pedantic-errors`. This was observed in Termux and in the macOS Travis CI environment, where we use Apple Clang: https://app.travis-ci.com/github/tanzislam/cryptopals/jobs/625697125 Interestingly, attempting to downgrade that error back to a warning with `-Wno-error=c++17-extensions` did not work. A similar Clang issue with a different C++17 attribute was also observed in nlohmann/json#1535.
- Loading branch information