On FreeBSD we get the following error when passing zero as the requested
alignment: error: requested alignment is not a power of 2
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D88820
static_assert((std::is_same<decltype(srand(0)), void>::value), "");
#if TEST_STD_VER > 14 && defined(TEST_HAS_ALIGNED_ALLOC)
- static_assert((std::is_same<decltype(aligned_alloc(0,0)), void*>::value), "");
+ static_assert((std::is_same<decltype(aligned_alloc(1, 0)), void*>::value),
+ "");
#endif
static_assert((std::is_same<decltype(calloc(0,0)), void*>::value), "");
static_assert((std::is_same<decltype(std::srand(0)), void>::value), "");
#if TEST_STD_VER > 14 && defined(TEST_HAS_ALIGNED_ALLOC)
- static_assert((std::is_same<decltype(std::aligned_alloc(0,0)), void*>::value), "");
+ static_assert(
+ (std::is_same<decltype(std::aligned_alloc(1, 0)), void*>::value), "");
#endif
static_assert((std::is_same<decltype(std::calloc(0,0)), void*>::value), "");