diff options
author | Jakub Szewczyk <git@kubasz.xyz> | 2022-03-18 22:10:04 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-18 15:10:04 -0700 |
commit | 88c2e4377df7dbe65bc8ef629ea409cd9df6a860 (patch) | |
tree | 0fe699c08ef55ed5902304e55851cdb1796c6881 /src/tools/tool-options.h | |
parent | 967245fbc75217d257eeba15ede4aeb56e3c0d89 (diff) | |
download | binaryen-88c2e4377df7dbe65bc8ef629ea409cd9df6a860.tar.gz binaryen-88c2e4377df7dbe65bc8ef629ea409cd9df6a860.tar.bz2 binaryen-88c2e4377df7dbe65bc8ef629ea409cd9df6a860.zip |
Fix errors when building in C++20 mode (#4528)
* use [[noreturn]] available since C++11 instead of compiler-specific attributes
* replace deprecated std::is_pod with is_trivial&&is_standard_layout (also available since C++11/14)
* explicitly capture this in [=] lambdas
* extra const functions in FeatureSet, fix implicit cast warning by using the features field directly
* Use CMAKE_CXX_STANDARD to ensure the C++ standard parameter is set on all targets, remove manual compiler flag workaround.
Diffstat (limited to 'src/tools/tool-options.h')
-rw-r--r-- | src/tools/tool-options.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/tool-options.h b/src/tools/tool-options.h index 0ed0f27fb..f8278e950 100644 --- a/src/tools/tool-options.h +++ b/src/tools/tool-options.h @@ -155,7 +155,7 @@ struct ToolOptions : public Options { std::string("Enable ") + description, ToolOptionsCategory, Arguments::Zero, - [=](Options*, const std::string&) { + [this, feature](Options*, const std::string&) { enabledFeatures.set(feature, true); disabledFeatures.set(feature, false); }) @@ -165,7 +165,7 @@ struct ToolOptions : public Options { std::string("Disable ") + description, ToolOptionsCategory, Arguments::Zero, - [=](Options*, const std::string&) { + [this, feature](Options*, const std::string&) { enabledFeatures.set(feature, false); disabledFeatures.set(feature, true); }); |