summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp')
-rw-r--r--libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp
index 1680f4349bb..07ffa0b7551 100644
--- a/libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp
+++ b/libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp
@@ -12,6 +12,8 @@
#include <stdlib.h>
#include <type_traits>
+#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__)
@@ -83,6 +85,14 @@ int main()
static_assert((std::is_same<decltype(strtoull("", endptr,0)), unsigned long long>::value), "");
static_assert((std::is_same<decltype(rand()), int>::value), "");
static_assert((std::is_same<decltype(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(aligned_alloc(0,0)), void*>::value), "");
+#endif
+#endif
+
static_assert((std::is_same<decltype(calloc(0,0)), void*>::value), "");
static_assert((std::is_same<decltype(free(0)), void>::value), "");
static_assert((std::is_same<decltype(malloc(0)), void*>::value), "");
OpenPOWER on IntegriCloud