Skip to content

Commit

Permalink
[Core] Add check for supported C/C++ versions
Browse files Browse the repository at this point in the history
  • Loading branch information
FintasticMan committed Jan 2, 2025
1 parent 902ff3b commit 79cf241
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions clay.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@
#ifndef CLAY_HEADER
#define CLAY_HEADER

#if !( \
(defined(__cplusplus) && __cplusplus >= 202002L) || \
(defined(__STDC__) && __STDC__ == 1 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
defined(_MSC_VER) \
)
#error "Clay requires C99, C++20, or MSVC"
#endif

#ifdef CLAY_WASM
#define CLAY_WASM_EXPORT(name) __attribute__((export_name(name)))
#else
Expand Down

0 comments on commit 79cf241

Please sign in to comment.