Skip to content

[BUILD] Fixes warnings of ciso646 in C++17 #3360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions api/include/opentelemetry/nostd/internal/absl/base/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,31 @@

// Include a standard library header to allow configuration based on the
// standard library in use.
#ifdef __cplusplus
#include <ciso646>
// Using C++20 feature-test macros when possible, otherwise fall back to
// ciso646/iso646.h.There are warnings when including ciso646 in C++17 mode
#ifdef __has_include
# if __has_include(<version>)
# include <version>
# endif
#elif defined(_MSC_VER) && \
((defined(__cplusplus) && __cplusplus >= 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L))
# if _MSC_VER >= 1922
# include <version>
# endif
#else
# if defined(__GNUC__) && !defined(__clang__) && !defined(__apple_build_version__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wcpp"
# elif defined(__clang__) || defined(__apple_build_version__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wcpp"
# endif
# include <ciso646>
# if defined(__GNUC__) && !defined(__clang__) && !defined(__apple_build_version__)
# pragma GCC diagnostic pop
# elif defined(__clang__) || defined(__apple_build_version__)
# pragma clang diagnostic pop
# endif
#endif

// -----------------------------------------------------------------------------
Expand Down
Loading