Skip to content

Commit

Permalink
Add some '#if defined' to generate a better error if OPENTELEMETRY_ST…
Browse files Browse the repository at this point in the history
…L_VERSION is set to a version unsupported by the current enviornment.
  • Loading branch information
bcsgh committed Jan 17, 2024
1 parent 7baf5f8 commit 3cc5c1b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions api/include/opentelemetry/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
#include "opentelemetry/common/macros.h"
#include "opentelemetry/detail/preprocessor.h"

#if defined(OPENTELEMETRY_STL_VERSION)
# if OPENTELEMETRY_STL_VERSION > (__cplusplus/100)
# pragma message OPENTELEMETRY_STRINGIFY(OPENTELEMETRY_STL_VERSION) " vs. " OPENTELEMETRY_STRINGIFY(__cplusplus)
# error "OPENTELEMETRY_STL_VERSION set to version newer than compilation version."
# endif
#endif

#ifndef OPENTELEMETRY_ABI_VERSION_NO
# define OPENTELEMETRY_ABI_VERSION_NO 1
#endif
Expand Down

0 comments on commit 3cc5c1b

Please sign in to comment.