Skip to content

Commit

Permalink
Merge pull request #670 from Cyan4973/fix664
Browse files Browse the repository at this point in the history
do no longer depend on `<assert.h>` for XXH_STATIC_ASSERT
  • Loading branch information
Cyan4973 authored Dec 29, 2021
2 parents 0e16359 + 6189ecd commit d878e1d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions xxhash.h
Original file line number Diff line number Diff line change
Expand Up @@ -1749,8 +1749,7 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size)
/* note: use after variable declarations */
#ifndef XXH_STATIC_ASSERT
# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */
# include <assert.h>
# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m); } while(0)
# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { _Static_assert((c),m); } while(0)
# elif defined(__cplusplus) && (__cplusplus >= 201103L) /* C++11 */
# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m); } while(0)
# else
Expand Down

0 comments on commit d878e1d

Please sign in to comment.