- const auto input_pair = decltype(allowed_pairs)::value_type(exponent_digits, mantissa_digits);
- for (const auto& pair : allowed_pairs) {
- if (input_pair == pair) {
- /* mantissa and exponent digits is a valid pair. */
- return;
- }
+ if (allowed_pairs.find({exponent_digits, mantissa_digits}) != allowed_pairs.end()) {
+ /* mantissa and exponent digits is a valid pair. */
+ return;