Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Commit

Permalink
Implement static assert
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkadiusz Wójcik committed Jan 10, 2025
1 parent 5281055 commit 95a14e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ extern FOUNDATION_LIBC_NORETURN void foundation_libc_assert(char const * asserti
#error "bad definition of FOUNDATION_LIBC_ASSERT_DEFAULT!"
#endif

#define static_assert FOUNDATION_LIBC_STATIC_ASSERT

#endif
2 changes: 2 additions & 0 deletions include/foundation/builtins.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#define FOUNDATION_LIBC_ASSERT FOUNDATION_LIBC_ASSERT_DEFAULT
#endif

#define FOUNDATION_LIBC_STATIC_ASSERT _Static_assert

#if defined(__clang__)

#define FOUNDATION_LIBC_NORETURN __attribute__((__noreturn__))
Expand Down

0 comments on commit 95a14e7

Please sign in to comment.