13 static constexpr
const char UUID_CHARS[] =
"0123456789ABCDEF";
14 static std::random_device rd;
15 static std::mt19937 gen( rd() );
16 static std::uniform_int_distribution<> dis( 0, 15 );
18 std::string uuid( 38,
' ' );
29 for (
int i = 1; i < 37; ++i )
31 if ( i != 9 && i != 14 && i != 19 && i != 24 && i != 15 )
33 uuid[i] = UUID_CHARS[dis( gen )];
std::string generateRandomGUID()
generates a new random GUID