type_check_ok(min, max);
}
- // min > max should not explode:
- {
- float min = 1.0, max = 0.0;
- type_check_ok(min, max);
- }
-
// When combining types, everything should convert to the largest type:
{
// Check with integral types:
ceph::util::random_number_generator<int> rng(1234); // seed
}
+ // Test deduction guides:
+ {
+ { ceph::util::random_number_generator rng(1234); }
+ { ceph::util::random_number_generator rng(1234.1234); }
+
+ {
+ int x = 1234;
+ ceph::util::random_number_generator rng(x);
+ }
+ }
+
{
int a = rng_i();
int b = rng_i();