summaryrefslogtreecommitdiff
path: root/test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp
diff options
context:
space:
mode:
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.cpp8
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()