uuid_v4
uuid_v4 copied to clipboard
problem with string representation
Hi, I encountered a problem when generating the string representation. The result of:
UUIDv4::UUIDGenerator<std::mt19937_64> uuidGenerator {};
std::cout << uuidGenerator.getUUID().str() << std::endl;
comes out as:
e4-718a-83ba179eb88d6589-a33a- a69d
Any idea what could be wrong?
When I try to print the generated UUIDs (using the code above) it didn't even compile due to the following error:
error: inlining failed in call to always_inline ‘__m256i _mm256_set1_epi8(char)’: target specific option mismatch
so I needed to set:
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
in my CMakeLists.txt
.
Then, the string representation looks fine to me.
That makes sense. I don't think I compiled with arch=native enabled. Tanks for the info.
When I was not able get the UUID generation working back in June, found a different way of solving my problem, not using any UUIDs at all. So I am not using the package at the moment.
Anyway to fix it in Windows?
You need to enable at least -msse4.1 -mavx -mavx2
to use this library. The -march=native
will enable everything you cpu support so will enable these flags automatically.