Boost logo

Boost :

Subject: Re: [boost] [Boost.Filesystem] unique_path uses a random number generator from the OS, correct?
From: Mikael Persson (mikael.s.persson_at_[hidden])
Date: 2015-01-09 14:49:01


Hi Ben,

The filesystem library has been proposed to the C++14 standard as a TS
library. This means that it's documentation is written in "standard-speak".
Throughout the standard, when it says things like "implementations are
encouraged to", the "implementation" is the compiler-vendor or implementer
of the standard library being used (which may or may not be the same
people).

So, in the case of Boost.Filesystem, you could see it as a Boost-provided
version of the standard filesystem library (or closely matching the final
form it takes for the standard TS). So, the "implementation" refers to the
Boost implementation itself.

This can be a bit confusing, but once to understand that it is written in
the same language (and perspective) as it would be if it appeared in the
C++ standard, this all makes sense.

Most likely, the boost implementation uses the Boost.Random or standard
<random> library with the "random_device" generator (which is probably
implemented in terms of something like CryptGenRandom or the /dev/urandom
device).

Mikael.


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