MCPcopy Create free account
hub / github.com/USCiLab/cereal / random_basic_string

Function random_basic_string

sandbox/performance.cpp:266–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

264
265template<class C>
266std::basic_string<C> random_basic_string(std::mt19937 & gen, size_t maxSize = 30)
267{
268 std::basic_string<C> s(std::uniform_int_distribution<int>(3, maxSize)(gen), ' ');
269 for(C & c : s)
270 c = static_cast<C>( std::uniform_int_distribution<int>( '~', '~' )(gen) );
271 return s;
272 return s;
273}
274
275template <size_t N>
276std::string random_binary_string(std::mt19937 & gen)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected