aboutsummaryrefslogtreecommitdiff
path: root/test/std/language.support/support.runtime/cstdlib.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/language.support/support.runtime/cstdlib.pass.cpp')
-rw-r--r--test/std/language.support/support.runtime/cstdlib.pass.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/std/language.support/support.runtime/cstdlib.pass.cpp b/test/std/language.support/support.runtime/cstdlib.pass.cpp
index 60f7d954db54..e9dda6cee4ee 100644
--- a/test/std/language.support/support.runtime/cstdlib.pass.cpp
+++ b/test/std/language.support/support.runtime/cstdlib.pass.cpp
@@ -13,6 +13,8 @@
#include <type_traits>
#include <cassert>
+#include "test_macros.h"
+
// As of 1/10/2015 clang emits a -Wnonnull warnings even if the warning occurs
// in an unevaluated context. For this reason we manually suppress the warning.
#if defined(__clang__)
@@ -71,6 +73,14 @@ int main()
static_assert((std::is_same<decltype(std::strtoull("", endptr,0)), unsigned long long>::value), "");
static_assert((std::is_same<decltype(std::rand()), int>::value), "");
static_assert((std::is_same<decltype(std::srand(0)), void>::value), "");
+
+// Microsoft does not implement aligned_alloc in their C library
+#ifndef TEST_COMPILER_C1XX
+#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES)
+ static_assert((std::is_same<decltype(std::aligned_alloc(0,0)), void*>::value), "");
+#endif
+#endif
+
static_assert((std::is_same<decltype(std::calloc(0,0)), void*>::value), "");
static_assert((std::is_same<decltype(std::free(0)), void>::value), "");
static_assert((std::is_same<decltype(std::malloc(0)), void*>::value), "");