Index: test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp =================================================================== --- test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp +++ test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp @@ -16,12 +16,12 @@ // size_t operator()(T val) const; // }; -// Not very portable - #include #include #include +#include "test_macros.h" + void test(int i) { @@ -31,7 +31,9 @@ static_assert((std::is_same::value), "" ); H h; T ec(i, std::system_category()); - assert(h(ec) == i); + const std::size_t result = h(ec); + LIBCPP_ASSERT(result == i); + ((void)result); // Prevent unused warning } int main() Index: test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp =================================================================== --- test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp +++ test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp @@ -16,12 +16,12 @@ // size_t operator()(T val) const; // }; -// Not very portable - #include #include #include +#include "test_macros.h" + template void test() @@ -32,7 +32,9 @@ static_assert((std::is_same::value), "" ); H h; T bs(static_cast(N)); - assert(h(bs) == N); + const std::size_t result = h(bs); + LIBCPP_ASSERT(result == N); + ((void)result); // Prevent unused warning } int main()