Boost logo

Boost :

Subject: Re: [boost] [uuid] Platform-specific UUID generator (was Re: Issue 9407: please merge fix)
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2015-01-18 09:54:52


On Sunday 18 January 2015 13:57:05 Klaim - Joël Lamotte wrote:
> On Fri, Jan 16, 2015 at 10:49 AM, Antony Polukhin <antoshkka_at_[hidden]>
>
> wrote:
> > Looks like Boost.UUID library is not maintained.
>
> This is unfortunate and reminded me this exchange:
> https://twitter.com/niv_anteru/status/487496938150195200
>
> A platform-specific random generator would apparently be far more efficient
> (I say apparently because I didn't know there were platform-specific
> uuid generation until I read this tweet).
>
> I reminded this with the fix discussion and made the ticket marked as
> feature request:
> https://svn.boost.org/trac/boost/ticket/10939
>
> I'm taking note to try a patch but don't hold your breath.
> Also, would there be any benefit in having another typedef in C++11 mode
> which would use the std mersene twister instead of the boost one?

If we're speaking about Windows then I believe the system-provided functions
for UUID generation require linking to auxiliary libraries (i.e. not
kernel32.dll) - COM implementation, if I'm not mistaken.

http://msdn.microsoft.com/en-us/library/windows/desktop/ms688568%28v=vs.85%29.aspx

Interestingly, it also mentions UuidCreate of which I didn't know before. It
also requires another library to link with and also does not guarantee
universal uniqueness.

On POSIX systems there is no standard API for UUIDs, AFAIK. I'm only aware of
libuuid, if it can be considered widespread enough.

The bottom line is that using specialized APIs will require linking to
additional libraries, possibly non-standard, which may be undesirable. OTOH,
it's not clear if UUID generation can be considered a performance critical
operation.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk