Closed mojca closed 1 year ago
Would a fix like this be acceptable?
diff --git a/include/boost/config/detail/suffix.hpp b/include/boost/config/detail/suffix.hpp
index 13d4bb6a..4b25f764 100644
--- a/include/boost/config/detail/suffix.hpp
+++ b/include/boost/config/detail/suffix.hpp
@@ -1039,7 +1039,11 @@ namespace std{ using ::type_info; }
// Unused variable/typedef workarounds:
//
#ifndef BOOST_ATTRIBUTE_UNUSED
-# define BOOST_ATTRIBUTE_UNUSED
+# if __cplusplus < 201703L
+# define BOOST_ATTRIBUTE_UNUSED
+# else
+# define BOOST_ATTRIBUTE_UNUSED [[maybe_unused]]
+# endif
#endif
//
// [[nodiscard]]:
I'll look into this shortly.
I'm compiling Boost 1.80.0 from source as part of a large project build. I'm using GitHub actions on
windows-2022
with Visual Studio 2022, CMake and "treat warnings as errors" turned on.I'm hitting the following error:
I have found:
It seems as if VS 2022 doesn't properly understand
BOOST_ATTRIBUTE_UNUSED
.