preprocessor.h 755 B

12345678910111213141516171819202122232425
  1. // Copyright The OpenTelemetry Authors
  2. // SPDX-License-Identifier: Apache-2.0
  3. // NOTE - code within detail namespace implements internal details, and not part
  4. // of the public interface.
  5. #pragma once
  6. #define OPENTELEMETRY_STRINGIFY(S) OPENTELEMETRY_STRINGIFY_(S)
  7. #define OPENTELEMETRY_STRINGIFY_(S) #S
  8. #define OPENTELEMETRY_CONCAT(A, B) OPENTELEMETRY_CONCAT_(A, B)
  9. #define OPENTELEMETRY_CONCAT_(A, B) A##B
  10. // Import the C++20 feature-test macros
  11. #ifdef __has_include
  12. # if __has_include(<version>)
  13. # include <version>
  14. # endif
  15. #elif defined(_MSC_VER) && ((defined(__cplusplus) && __cplusplus >= 202002L) || \
  16. (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L))
  17. # if _MSC_VER >= 1922
  18. # include <version>
  19. # endif
  20. #endif