You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libcxx/test/std/numerics/rand/rand.device/entropy.pass.cpp

25 lines
571 B
C++

//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// <random>
// class random_device;
// double entropy() const;
#include <random>
#include <cassert>
int main()
{
std::random_device r;
double e = r.entropy();
((void)e); // Prevent unused warning
}