Added a static assertion for IEEE 754 floating point compliance
(cherry-picked from commit 1bfa8e363c
)
This commit is contained in:
parent
3848fe30a9
commit
5aa4bf24ee
1 changed files with 4 additions and 1 deletions
|
@ -15,11 +15,12 @@
|
|||
#include "random.hpp"
|
||||
#include "log.hpp"
|
||||
|
||||
#include <boost/random/random_device.hpp>
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdlib>
|
||||
#include <limits>
|
||||
#include <random>
|
||||
#include <boost/random/random_device.hpp>
|
||||
|
||||
static lg::log_domain log_random("random");
|
||||
#define DBG_RND LOG_STREAM(debug, log_random)
|
||||
|
@ -27,6 +28,8 @@ static lg::log_domain log_random("random");
|
|||
#define WRN_RND LOG_STREAM(warn, log_random)
|
||||
#define ERR_RND LOG_STREAM(err, log_random)
|
||||
|
||||
static_assert(std::numeric_limits<double>::is_iec559, "Floating point representation is not IEEE 754-compliant");
|
||||
|
||||
namespace {
|
||||
|
||||
class rng_default : public randomness::rng
|
||||
|
|
Loading…
Add table
Reference in a new issue