Fortune for rngxx's current commit: Future curse − 末凶iter
parent
b071cbb1ad
commit
3ff3db0e3e
@ -0,0 +1,10 @@
|
||||
#include <rngxx.hpp>
|
||||
|
||||
//XXX: Doing this is not going to work ...
|
||||
#if 0
|
||||
void t(Random& r)
|
||||
{
|
||||
for(auto&& i : r.iter<int>()) (void)i;
|
||||
}
|
||||
#endif
|
||||
|
@ -0,0 +1,17 @@
|
||||
#include <fmt/format.h>
|
||||
#include <rngxx.hpp>
|
||||
#include <rngxx/crand.h>
|
||||
|
||||
void iter(Random& rng)
|
||||
{
|
||||
for(auto&& i : rng.iter<int>())
|
||||
fmt::print("{} ", i);
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
void cpp_test()
|
||||
{
|
||||
auto random = new rng::crand(100);
|
||||
iter(random);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue