mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 04:56:36 +00:00
[lldb] uint8_t -> unsigned short in std::independent_bits_engine
According to [1], the template parameter must be cv-unqualified and one of unsigned short, unsigned int, unsigned long, or unsigned long long. Should fix the following MSVC error: error: static assertion failed due to requirement '_Is_any_of_v<unsigned char, unsigned short, unsigned int, unsigned long, unsigned long long>': invalid template argument for independent_bits_engine: N4659 [1] https://en.cppreference.com/w/cpp/numeric/random/independent_bits_engine
This commit is contained in:
parent
00122bb56b
commit
6f959a46c0
@ -123,7 +123,8 @@ UUID UUID::Generate(uint32_t num_bytes) {
|
||||
// If getRandomBytes failed, fall back to a lower entropy source.
|
||||
if (ec) {
|
||||
auto seed = std::chrono::steady_clock::now().time_since_epoch().count();
|
||||
std::independent_bits_engine<std::default_random_engine, CHAR_BIT, uint8_t>
|
||||
std::independent_bits_engine<std::default_random_engine, CHAR_BIT,
|
||||
unsigned short>
|
||||
engine(seed);
|
||||
std::generate(bytes.begin(), bytes.end(), std::ref(engine));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user