Skip to content

Commit

Permalink
uuid_time_generator disabled, eliminating Windows dependency; #define…
Browse files Browse the repository at this point in the history
… UUID_TIME_GENERATOR to re-enable
  • Loading branch information
EvanBalster committed Dec 27, 2020
1 parent 5890c94 commit 359b195
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/uuid.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <atomic>
#include <span>

#if defined(UUID_TIME_GENERATOR) || defined(UUID_SYSTEM_GENERATOR)
#ifdef _WIN32
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
Expand Down Expand Up @@ -46,6 +47,7 @@
#include <CoreFoundation/CFUUID.h>
#endif

#endif
#endif

namespace uuids
Expand Down Expand Up @@ -843,6 +845,7 @@ namespace uuids
detail::sha1 hasher;
};

#ifdef UUID_TIME_GENERATOR
// !!! DO NOT USE THIS IN PRODUCTION
// this implementation is unreliable for good uuids
class uuid_time_generator
Expand Down Expand Up @@ -924,6 +927,7 @@ namespace uuids
return {};
}
};
#endif
}

namespace std
Expand Down

0 comments on commit 359b195

Please sign in to comment.