diff options
author | Daniel Wilhelm <shieldwed@outlook.com> | 2018-06-30 12:43:08 +0200 |
---|---|---|
committer | Daniel Wilhelm <shieldwed@outlook.com> | 2018-06-30 12:43:08 +0200 |
commit | a98326eb2954ac1e79f5eac28dbeab3ec15e047f (patch) | |
tree | bb16257a1894b488e365851273735ec13a9442ef /zen/guid.h | |
parent | 10.0 (diff) | |
download | FreeFileSync-a98326eb2954ac1e79f5eac28dbeab3ec15e047f.tar.gz FreeFileSync-a98326eb2954ac1e79f5eac28dbeab3ec15e047f.tar.bz2 FreeFileSync-a98326eb2954ac1e79f5eac28dbeab3ec15e047f.zip |
10.1
Diffstat (limited to 'zen/guid.h')
-rwxr-xr-x | zen/guid.h | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -8,16 +8,7 @@ #define GUID_H_80425780237502345 #include <string> - -#ifdef __GNUC__ //boost should clean this mess up - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif -#include <boost/uuid/uuid_generators.hpp> -#ifdef __GNUC__ - #pragma GCC diagnostic pop -#endif - + #include <boost/uuid/uuid_generators.hpp> namespace zen { @@ -28,6 +19,7 @@ std::string generateGUID() //creates a 16-byte GUID // retrieve GUID: 0.13µs per call //generator is only thread-safe like an int => keep thread-local thread_local boost::uuids::random_generator gen; + static_assert(boost::uuids::uuid::static_size() == 16); const boost::uuids::uuid nativeRep = gen(); return std::string(nativeRep.begin(), nativeRep.end()); } |