std::shuffle( first, last, random_gen );
}
+
+ static inline unsigned int rand( unsigned int nMax )
+ {
+ double rnd = double( std::rand() ) / double( RAND_MAX );
+ unsigned int n = (unsigned int)(rnd * nMax);
+ return n < nMax ? n : (n - 1);
+ }
};
} // namespace cds_test