diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:47:26 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:47:26 +0000 |
commit | 51072bd6bf79ef2bc6a922079bff57c31c1effbc (patch) | |
tree | 91a2effbc9e6f80bdbbf9eb70e06c51ad0867ea0 /test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp | |
parent | bb5e33f003797b67974a8893f7f2930fc51b8210 (diff) |
Notes
Diffstat (limited to 'test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp')
-rw-r--r-- | test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp b/test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp index 520f2e8757c2..bc65078911b2 100644 --- a/test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp +++ b/test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp @@ -16,12 +16,12 @@ // size_t operator()(T val) const; // }; -// Not very portable - #include <bitset> #include <cassert> #include <type_traits> +#include "test_macros.h" + template <std::size_t N> void test() @@ -32,7 +32,9 @@ test() static_assert((std::is_same<typename H::result_type, std::size_t>::value), "" ); H h; T bs(static_cast<unsigned long long>(N)); - assert(h(bs) == N); + const std::size_t result = h(bs); + LIBCPP_ASSERT(result == N); + ((void)result); // Prevent unused warning } int main() |