Commit b106dcc7 authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot

uint8_t isn't a valid template argument for uniform_int_distribution

Summary: Clang and GCC allow it, but the spec, and MSVC, don't, so use uint16_t instead.

Reviewed By: yfeldblum

Differential Revision: D4099285

fbshipit-source-id: cdf7ba14b6c00e1bcdfc3650b76e6e4a47a61929
parent c39c808c
......@@ -55,10 +55,10 @@ TEST_F(SparseByteSetTest, each) {
TEST_F(SparseByteSetTest, each_random) {
mt19937 rng;
uniform_int_distribution<uint8_t> dist;
uniform_int_distribution<uint16_t> dist{lims::min(), lims::max()};
set<uint8_t> added;
while (added.size() <= lims::max()) {
auto c = dist(rng);
auto c = uint8_t(dist(rng));
EXPECT_EQ(added.count(c), s.contains(c));
EXPECT_EQ(!added.count(c), s.add(c));
added.insert(c);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment