| 570 | */ |
| 571 | template <typename T> |
| 572 | std::pair<T, T> random_pair(const T min, const T max) |
| 573 | { |
| 574 | static std::random_device rand_device; |
| 575 | static std::mt19937_64 twister(rand_device()); |
| 576 | std::uniform_int_distribution<T> dist(min, max); |
| 577 | T first = dist(twister); |
| 578 | T second; |
| 579 | do |
| 580 | second = dist(twister); |
| 581 | while (second == first); |
| 582 | if (second < first) |
| 583 | return {second, first}; |
| 584 | return {first, second}; |
| 585 | } |
| 586 | |
| 587 | // ======================================== |
| 588 | // Functions for detecting various features |
no outgoing calls
no test coverage detected