Merge pull request #34 from EvanBalster/master

Remove Windows dependency (disable uuid_time_generator by default)
This commit is contained in:
Marius Bancila 2021-06-14 09:54:58 +03:00 committed by GitHub
commit 9e5162c3d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,7 @@
#include <atomic> #include <atomic>
#include <span> #include <span>
#if defined(UUID_TIME_GENERATOR) || defined(UUID_SYSTEM_GENERATOR)
#ifdef _WIN32 #ifdef _WIN32
#ifndef WIN32_LEAN_AND_MEAN #ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
@ -46,6 +47,7 @@
#include <CoreFoundation/CFUUID.h> #include <CoreFoundation/CFUUID.h>
#endif #endif
#endif
#endif #endif
namespace uuids namespace uuids
@ -805,6 +807,7 @@ namespace uuids
detail::sha1 hasher; detail::sha1 hasher;
}; };
#ifdef UUID_TIME_GENERATOR
// !!! DO NOT USE THIS IN PRODUCTION // !!! DO NOT USE THIS IN PRODUCTION
// this implementation is unreliable for good uuids // this implementation is unreliable for good uuids
class uuid_time_generator class uuid_time_generator
@ -886,6 +889,7 @@ namespace uuids
return {}; return {};
} }
}; };
#endif
} }
namespace std namespace std